unwind/Dockerfile
ducklet af25d9c5a2 change the container to be more production ready
This includes the code files in the docker image and creates a separate
data dir, which means we don't need to manually mount files into the
container anymore.
2021-07-25 18:06:17 +02:00

24 lines
446 B
Docker

FROM docker.io/library/python:3.9-alpine
RUN apk update --no-cache \
&& apk upgrade --no-cache \
&& pip install --no-cache-dir --upgrade pip
RUN addgroup -g 10001 py \
&& adduser -D -u 10000 -G py py
WORKDIR /var/app
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade --requirement requirements.txt
USER 10000:10001
COPY . ./
ENV UNWIND_DATA="/data"
VOLUME ["/data"]
ENTRYPOINT ["/var/app/run"]
CMD ["server"]