Skip to content

jsware/docker-github-pages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local GitHub Pages for Development

This Docker image contains a copy of ruby and the GitHub Pages dependencies.

To use this repository issue the following command from the directory where you are working on your GitHub Pages repository:

docker run --rm --interactive --tty --volume .:/home --pubish 4000:4000 --env JEKYLL_GITHUB_TOKEN=$JEKYLL_GITHUB_TOKEN jsware/github-pages

The image will start and server the GitHub Pages site from the current directory (mapped to /home in the container). When files are changed it will regenerate the site.

The same command can be run with shorter options:

docker run --rm -it -v .:/home -p 4000:4000 -e JEKYLL_GITHUB_TOKEN=$JEKYLL_GITHUB_TOKEN jsware/github-pages

If you do not need GitHub credentials for your repository, you may remove the --env JEKYLL_GITHUB_TOKEN=$JEKYLL_GITHUB_TOKEN argument.

These commands assume your GitHub token for Jekyll is in an environment variable called JEKYLL_GITHUB_TOKEN. You could use --env-file to specify an environment variable file instead.

About

GitHub Pages Docker Image for Local Development Hosting

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published