From ccfc99af5c122cc8947ae9224538f65f939aa3e2 Mon Sep 17 00:00:00 2001 From: Vincent Stumpf Date: Fri, 12 Jan 2024 11:07:54 -0800 Subject: [PATCH] Add docker file for local development (#11) --- README.md | 15 +++++++++++++++ docker/Dockerfile | 8 ++++++++ docker/Dockerfile.dockerignore | 1 + 3 files changed, 24 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/Dockerfile.dockerignore diff --git a/README.md b/README.md index ab93b53..0e5df35 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,20 @@ Each time a commit is pushed to the master branch, the site is automatically reb ## Contributing If you would like to contribute to this project, please read the [Contributing Guide](CONTRIBUTING.md). +## Development +You can use the included dockerfile to create a docker container for development. Run the following commands in the root directory of the project (where this file is). + +### Build the container + +`docker build -f docker/Dockerfile -t ra-user-guides .` + +This uses the same base image as the github actions, then installs the extra packages in `.github/requirements.txt`. You only need to do this once, or every time the list of requirements change. + +### Run the container + +`docker run --rm -it -p 8000:8000 -v ${PWD}:/docs ra-user-guides` + +This runs the container we made in step one, mounts our current directory to `/docs` in the container, and opens the `8000` port. This will watch for changes as we make them. You can see the changes in your browser by going to `localhost:8000/user-guides` + ## License This project is licensed under the same terms as rAthena's [Source Code](https://github.com/rathena/rathena) - see the [LICENSE](https://github.com/rathena/rathena/blob/master/LICENSE) file for details. diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..0b4299b --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,8 @@ +FROM squidfunk/mkdocs-material:9.0.6 + +RUN apk add --no-cache bash + +COPY .github/requirements.txt /requirements.txt + +RUN pip install -r /requirements.txt + diff --git a/docker/Dockerfile.dockerignore b/docker/Dockerfile.dockerignore new file mode 100644 index 0000000..6b8710a --- /dev/null +++ b/docker/Dockerfile.dockerignore @@ -0,0 +1 @@ +.git