techrec/Dockerfile

31 lines
621 B
Text
Raw Normal View History

2023-03-31 02:22:52 +02:00
FROM python:3.7-alpine
2021-09-15 07:51:58 +02:00
ARG hostuid=1000
ARG hostgid=1000
ENV TECHREC_CONFIG=/src/techrec/docker/config.py
ENV DEBIAN_FRONTEND=noninteractive
2023-03-31 02:22:52 +02:00
RUN apk update && apk add ffmpeg shadow
2021-09-15 07:51:58 +02:00
WORKDIR /src
COPY . /src/techrec
RUN groupadd -g ${hostgid} techrec \
&& useradd -g techrec -u ${hostuid} -m techrec \
&& mkdir -p /src/techrec \
&& mkdir -p /src/db \
2023-03-31 02:22:52 +02:00
&& chown -R techrec:techrec /src
2021-09-15 07:51:58 +02:00
USER techrec
RUN python -m venv ./venv \
&& ./venv/bin/python -m pip install wheel \
&& ./venv/bin/python -m pip install -e ./techrec
VOLUME ["/src/db"]
EXPOSE 8000
2023-03-31 02:22:52 +02:00
CMD ["/src/techrec/docker/run-techrec.sh"]