-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Build DevDocs with Docker
Docker provides a quick and easy way to build and preview the documentation. You do not need to install Ruby dependencies manually. This Docker solution launches Jekyll inside the container in watch mode.
Every change of a markdown file automatically triggers a rebuild of the documentation.
-
Install Docker. If you have Docker installed, launch the Docker application.
-
Clone the DevDocs repository.
-
Change to the
devdocs
directory. -
Build and start the Docker environment.
docker-compose up
-
Use the server address URL provided by the system response.
For example:
jekyll_1 | Server address: http://127.0.0.1:4000/ jekyll_1 | Server running... press ctrl-c to stop.
-
Press
Ctrl+C
in the serve terminal to stop the server.
To access the container command line:
-
While the server is running, open a new terminal and change to the
devdocs
directory. -
Find and copy your container ID.
docker ps
-
Access the container's
/srv/jekyll #
shell in interactive mode using your container ID.docker exec -it <container-id> /bin/sh
-
Run a check utility to test your Markdown.
/srv/jekyll # rake check:mdl
See the Testing topic for more utilities.
-
Use
exit
to close the interactive shell.
NOTE: The DevDocs project uses custom
rake
tooling and plugins that may not be supported in the Docker image.