- Install Docker Desktop
- Learn about Docker build{:target="_blank"}
- Open Docker Desktop to start the daemon
- Verify the following files are in the
/featurebase-docs
root:- Dockerfile
- docker-compose.yml
NOTE: There are undoubtedly other methods of setting up Docker, however this way definitely works.
NOTE: This process can take some time if starting from scratch or after executing docker system prune -a
-
Open a CLI then CD to the
/featurebase-docs
directory -
Load the container
OS | CLI | Command |
---|---|---|
Windows | Powershell | `Get-Content Dockerfile |
Linux | Bash | docker build - < Dockerfile |
Mac | Terminal | docker build - < Dockerfile |
NOTE: Changes to configuration files such as /_config.yml
are not loaded while the site is up.
- Run the the following in the
/featurebase-docs
directory:
docker compose up serve
Error | Cause |
---|---|
featurebase-docs-site-container exited with code 1 |
Scroll up, there's usually a missing include file or something else interfering with the Jekyll build |
docker network not found |
The network may have been killed due to a docker prune command or suchlike |
To view the local site on port 4000
head to:
- http://localhost:4000/ or
- http://:4000
Updated content is reloaded automatically on save with the exception of:
/_config.yml
git pull
To stop the server
- Open the CLI where the server is running
- Press CTRL+C
Containers and images can be deleted from Docker Desktop if required or via the command line.