Deploy Docsy inside a Docker container
2 minute read
We provide a Docker image that you can use to run and test your Docsy site locally, without having to install all Docsy’s dependencies.
Install the prerequisites
On Mac and Windows, download and install Docker Desktop. On Linux, install Docker engine and Docker compose.
The installation may require you to reboot your computer for the changes to take effect.
Create your repository from the docsy-example template
The docsy-example repository provides a basic site structure that you can use as starting point to create your own documentation.
Use the docsy-example template to create your own repository.
Download the code to your local machine by cloning your newly created repository.
Change your working directory to the newly created folder:
cd docsy-example
Build and run the container
The docsy-example repository includes a Dockerfile that you can use to run your site.
Build the docker image:
docker-compose build
Run the built image:
docker-compose up
Open the address
http://localhost:1313
in your web browser to load the docsy-example homepage. You can now make changes to the source files, those changes will be live-reloaded in your browser.
Cleanup
To cleanup your system and delete the container image follow the next steps.
Stop Docker Compose with Ctrl + C.
Remove the produced images
docker-compose rm