-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (27 loc) · 711 Bytes
/
Dockerfile
File metadata and controls
39 lines (27 loc) · 711 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
32
33
34
35
36
37
38
39
FROM python:3.13-slim
# ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV LANG=C.UTF-8
ARG UID=1000
ARG GID=1000
ARG POETRY_VERSION=2.2.1
RUN apt update && apt install -y \
vim \
make \
gcc \
gettext \
graphviz \
graphviz-dev \
libpq-dev \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
RUN pip install poetry=="${POETRY_VERSION}"
RUN groupadd -g "${GID}" django && useradd --create-home --no-log-init -u "${UID}" -g "${GID}" django
RUN mkdir /opt/app
RUN chown "${UID}:${GID}" /opt/app
USER django
WORKDIR /opt/app
COPY --chown="${UID}:${GID}" . /opt/app
RUN poetry install --no-interaction --no-ansi
WORKDIR /opt/app/project