GitHub Pages server in a docker
1.4K
Run the GitHub Pages server docker image. First move to the directory where the GitHub Pages sources are located:
docker run --rm --tty --publish 4000:4000 \
--volume ${PWD}:/var/lib/github-pages \
jmlemetayer/github-pages
The GitHub Metadata plugin (i.e. site.github) works as is
if the directory is also a git repository and there is a valid git remote
named origin.
For some fields, like cname, you need to authenticate yourself. Begin by
generating a new personal access token on GitHub.com:
Now you can use the JEKYLL_GITHUB_TOKEN environment variable:
docker run --rm --tty --publish 4000:4000 \
--volume ${PWD}:/var/lib/github-pages \
--env JEKYLL_GITHUB_TOKEN=123mytoken321 \
jmlemetayer/github-pages
You can override the site.repository by using the PAGES_REPO_NWO
environment variable:
docker run --rm --tty --publish 4000:4000 \
--volume ${PWD}:/var/lib/github-pages \
--env PAGES_REPO_NWO=username/repo-name \
jmlemetayer/github-pages
Content type
Image
Digest
sha256:d2997a563…
Size
188.4 MB
Last updated
almost 2 years ago
docker pull jmlemetayer/github-pages