Setup the Microsite Locally with Docker - hackforla/internship GitHub Wiki

Installation instructions

Prerequisites

  • Install Docker on your machine.

Setting up the development environment

  1. Fork and Clone this Repository (see Working with forks and branches below) git clone hackforla/internship-website-design-system
  2. Enter repo directory cd internship-website-design-system
  3. Build the Docker image. docker build -t mkdocs-site . This command builds a Docker image named mkdocs-site from the Dockerfile in the current directory.
  4. Run the Docker container. docker run -p 8000:8000 -v $(pwd):/app internship-website-design-system This command runs the mkdocs-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 the docker run command to a free port, e.g., docker run -p 8001:8000 mkdocs-site. -If you get a ERROR [internal] load metadata for docker.io/library/python:3.8-slim error run docker pull python:3.8-slim
  1. 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.