Setup the Microsite Locally with Docker - hackforla/internship GitHub Wiki
Installation instructions
Prerequisites
- Install Docker on your machine.
Setting up the development environment
- Fork and Clone this Repository (see Working with forks and branches below)
git clone hackforla/internship-website-design-system
- Enter repo directory
cd internship-website-design-system
- Build the Docker image.
docker build -t mkdocs-site .
This command builds a Docker image namedmkdocs-site
from the Dockerfile in the current directory. - Run the Docker container.
docker run -p 8000:8000 -v $(pwd):/app internship-website-design-system
This command runs themkdocs-site
image as a container and maps the container's port 8000 to port 8000 on your host machine, allowing you to access the MkDocs server.
Notes
- If you make changes to the documentation source files, you will need to rebuild the Docker image to see the changes.
- If the default port (8000) is already in use on your machine, you can map the container's port to a different port on your host machine by changing the first
8000
in thedocker run
command to a free port, e.g.,docker run -p 8001:8000 mkdocs-site
. -If you get aERROR [internal] load metadata for docker.io/library/python:3.8-slim
error rundocker pull python:3.8-slim
- View the site by navigating to
http://localhost:8000
in your web browser.
You should see your MkDocs site being served from the Docker container.