diff --git a/Dockerfile b/Dockerfile index 2c8673b..cd274f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,17 @@ # We may as well use the same image we use for actually deploying our sites. FROM circleci/python:3.9 +# switch from circleci user to root +USER root + # Dependencies RUN pip install mkdocs pymdown-extensions pygments # Install the PagerDuty theme. WORKDIR /tmp -RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty \ - cd mkdocs-theme-pagerduty && python3 setup.py install +RUN git clone https://github.com/pagerduty/mkdocs-theme-pagerduty +WORKDIR /tmp/mkdocs-theme-pagerduty +RUN python3 setup.py install # Set our working directory and user WORKDIR /docs diff --git a/README.md b/README.md index 3e3f8b1..009710c 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ For local development on your native device, ### Docker For local development using Docker, -1. Build the docker image and load it for immediate use. `docker build --load -t mkdocs .` +1. Build the docker image and load it for immediate use. `docker build -t mkdocs .` 1. Run the container and pass through your current working directory. `docker run -v $(pwd):/docs -p 127.0.0.1:8000:8000 mkdocs` 1. You can now view the website in your browser at `http://127.0.0.1:8000`. The site will automatically update as you edit the code.