diff --git a/Dockerfile b/Dockerfile index 9a8c668..6cf38d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,14 @@ FROM python:3.11-rc-alpine ENV cloud_name raincloud -RUN apk update && apk add git +COPY . /tmp/raincloud + RUN python -m venv /opt/venv -RUN . /opt/venv/bin/activate && python -m pip install git+https://github.com/Deleh/raincloud +RUN . /opt/venv/bin/activate && cd /tmp/raincloud && python -m pip install . RUN . /opt/venv/bin/activate && python -m pip install gunicorn +RUN rm -rf /tmp/raincloud + EXPOSE 8000/tcp ENTRYPOINT . /opt/venv/bin/activate && gunicorn --bind=0.0.0.0:8000 "raincloud:create_app(base_path='/var/www/raincloud',cloud_name='${cloud_name}')" \ No newline at end of file diff --git a/README.org b/README.org index c04cff0..bb71c30 100644 --- a/README.org +++ b/README.org @@ -91,10 +91,10 @@ *** Docker - A self-contained =Dockerfile=, based on [[https://www.alpinelinux.org/][Alpine Linux]], is available in the repository. + A =Dockerfile=, based on [[https://www.alpinelinux.org/][Alpine Linux]], is available in the repository. You can use it to build a /raincloud/ image locally with the following command: - : $ docker build -t raincloud:latest -f <(curl https://raw.githubusercontent.com/Deleh/raincloud/master/Dockerfile) + : $ docker build -t raincloud:latest . A container of the image exposes raincloud at port =8000= and uses the base directory =/var/www/raincloud=. Use dockers =-p= flag to map the port on your host and =-v= flag to mount a local base directory: