2021-09-15 07:51:58 +02:00
|
|
|
FROM python:3.7
|
|
|
|
|
|
|
|
ARG hostuid=1000
|
|
|
|
ARG hostgid=1000
|
|
|
|
|
|
|
|
ENV TECHREC_CONFIG=/src/techrec/docker/config.py
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
COPY . /src/techrec
|
|
|
|
|
|
|
|
RUN groupadd -g ${hostgid} techrec \
|
|
|
|
&& useradd -g techrec -u ${hostuid} -m techrec \
|
|
|
|
&& mkdir -p /src/techrec \
|
2021-09-20 22:52:27 +02:00
|
|
|
&& mkdir -p /src/db \
|
2021-09-15 07:51:58 +02:00
|
|
|
&& chown -R techrec:techrec /src \
|
2021-09-17 10:22:55 +02:00
|
|
|
&& apt-get -qq update \
|
|
|
|
&& apt-get install -qq -y ffmpeg \
|
2021-09-15 07:51:58 +02:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
USER techrec
|
|
|
|
|
|
|
|
|
|
|
|
RUN python -m venv ./venv \
|
|
|
|
&& ./venv/bin/python -m pip install wheel \
|
|
|
|
&& ./venv/bin/python -m pip install -e ./techrec
|
|
|
|
|
2021-09-20 22:52:27 +02:00
|
|
|
VOLUME ["/src/db"]
|
|
|
|
EXPOSE 8000
|
|
|
|
|
2021-09-15 07:51:58 +02:00
|
|
|
ENTRYPOINT ["/src/venv/bin/techrec"]
|
|
|
|
CMD ["-vv", "serve"]
|