-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (26 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
39 lines (26 loc) · 1.15 KB
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 wodby/python:3.14-dev@sha256:5bdb5fefbdd9cd231f015c82a5e8377ac2e0ba947d1e789b719fd72b79ea111b AS build
ARG ENVIRONMENT=production
RUN --mount=type=cache,id=pip-cache,uid=1000,gid=1000,target=/home/wodby/.cache/pip/ \
--mount=type=cache,id=poetry-cache,uid=1000,gid=1000,target=/home/wodby/.cache/pypoetry/ \
pip install --upgrade 'pip==25.3' && \
pip install 'poetry==2.3.2' && \
poetry config virtualenvs.create false
ADD ./pyproject.toml ./poetry.lock ./LICENSE ./
RUN --mount=type=cache,id=poetry-cache,uid=1000,gid=1000,target=/home/wodby/.cache/pypoetry/ \
if [ "$ENVIRONMENT" = "development" ]; then \
poetry install; \
else \
poetry install --without dev; \
fi
FROM wodby/python:3.14@sha256:248546885341200cbe957253e85270f9f2ab6b510023474f895b363e2a513fe9 AS runtime
USER root
RUN apk add --no-cache \
pango \
fontconfig \
ttf-dejavu
USER wodby
COPY LICENSE ./
ENV GUNICORN_APP=main.wsgi:application
COPY --from=build /home/wodby/.local/lib/python3.14/site-packages/ /home/wodby/.local/lib/python3.14/site-packages/
COPY --from=build /home/wodby/.local/bin/ /home/wodby/.local/bin/
COPY ./src ./