- Run a container (downloads image from the default registry Docker Hub ~16.95 MB)
- macOS
docker run --name dsalim.dev -dp 4000:4000 --rm caddydz/caddydz.github.io && open http://localhost:4000
- Windows
docker run --name dsalim.dev -dp 4000:4000 --rm caddydz/caddydz.github.io && start "http://localhost:4000"
- Clone the repository
git clone https://github.com/CaddyDz/caddydz.github.io Caddy
- Change into the directory
cd Caddy
- Build the Docker image
docker build --no-cache -t caddydz/caddydz.github.io .
- Run a container binding the project into its volume
docker run --name dsalim.dev -dp 35729:35729 -p 4000:4000 -v $(pwd):/srv --rm caddydz/caddydz.github.io
Port 35729 is bound for live reload
- Open http://localhost:4000 in a browser