A Docker image for mocking GitHub Pages
924
This is a Docker image you can use to test GitHub Pages websites before publishing them.
On a Linux or Mac system with Docker installed, setup is dead simple.
You can open your shell configuration file in your home directory,
such as ~/.bashrc or ~/.zshrc,
and add the following command:
alias github-pages='docker run -it -p 80:80 -p 35729:35729 -v "$PWD:/srv" --rm gnpivo/github-pages'
After you restart your terminal, you can navigate to any website directory and start the server with the following command:
github-pages
You can then see the website by going to localhost in your browser.
Press Ctrl+C in your terminal to stop the server.
If you would prefer to build the Docker image yourself, you can clone the repository and run the following command in it:
docker build -t gnpivo/github-pages .
The following command will remove the Docker image:
docker rmi gnpivo/github-pages
Content type
Image
Digest
sha256:53609e3cd…
Size
62.2 MB
Last updated
over 2 years ago
docker pull gnpivo/github-pages