-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.prod
More file actions
31 lines (25 loc) · 794 Bytes
/
Dockerfile.prod
File metadata and controls
31 lines (25 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.10
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV POETRY_VIRTUALENVS_CREATE=true
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
ENV POETRY_NO_INTERACTION=1
RUN apt update && apt install -y --no-install-recommends curl wget libgtk-3-0 gettext
RUN python -m pip install --upgrade pip
RUN useradd -ms /bin/bash python
RUN pip install poetry
USER python
WORKDIR /home/python/app
ENV PYTHONPATH=${PYTHONPATH}/home/python/app
ENV PATH="$PATH:$PYTHONPATH/.venv/bin"
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV POETRY_VIRTUALENVS_CREATE=true
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
ENV POETRY_NO_INTERACTION=1
WORKDIR /home/python/app
COPY --from=builder /home/python/app/venv ./venv
COPY . ./
USER python
ENTRYPOINT ["./.docker/entrypoint.sh"]