tubearchivist-server/tubearchivist/web/Dockerfile

34 lines
746 B
Docker
Raw Normal View History

# builder
2024-04-19 16:51:26 +00:00
FROM python:3.11.8-slim-bookworm as builder
2022-04-29 10:48:25 +00:00
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential
2022-04-29 10:48:25 +00:00
COPY requirements.txt /requirements.txt
RUN pip install --user -r requirements.txt
# final
2024-04-19 16:51:26 +00:00
FROM python:3.11.8-slim-bookworm as tubearchivist-web
ARG INSTALL_DEBUG
ENV PYTHONUNBUFFERED 1
COPY --from=builder /root/.local /root/.local
ENV PATH=/root/.local/bin:$PATH
RUN if [ "$INSTALL_DEBUG" ] ; then \
apt-get -y update && apt-get -y install --no-install-recommends \
vim htop bmon net-tools iputils-ping procps \
&& pip install --user ipython \
; fi
2022-04-29 10:48:25 +00:00
2022-05-20 12:53:04 +00:00
RUN mkdir /data
2022-04-29 10:48:25 +00:00
COPY . /srv/flask_app
WORKDIR /srv/flask_app
RUN chmod +x ./start.sh
2022-05-20 12:53:04 +00:00
VOLUME /data
2022-04-29 10:48:25 +00:00
CMD ["./start.sh"]