Skip to content

Commit 5a2fe7f

Browse files
committed
[PPHA-186] Use common python base stage
1 parent 7057b79 commit 5a2fe7f

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Dockerfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ RUN npm ci
88
RUN npm run compile
99

1010

11-
FROM python:3.13.5-alpine3.21 AS builder
11+
FROM python:3.13.5-alpine3.21 AS python_base
12+
13+
ENV PYTHONDONTWRITEBYTECODE=1 \
14+
PYTHONUNBUFFERED=1
15+
16+
FROM python_base AS builder
1217

1318
WORKDIR /app
1419

15-
ENV PYTHONDONTWRITEBYTECODE=1 \
16-
PYTHONUNBUFFERED=1 \
17-
POETRY_NO_INTERACTION=1 \
20+
ENV POETRY_NO_INTERACTION=1 \
1821
POETRY_VIRTUALENVS_IN_PROJECT=1 \
1922
POETRY_VIRTUALENVS_CREATE=1 \
2023
POETRY_CACHE_DIR=/tmp/poetry_cache
@@ -24,11 +27,9 @@ RUN pip install poetry
2427
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR
2528

2629

27-
FROM python:3.13.5-alpine3.21
30+
FROM python_base
2831

29-
ENV PYTHONDONTWRITEBYTECODE=1 \
30-
PYTHONUNBUFFERED=1 \
31-
VIRTUAL_ENV=/app/.venv \
32+
ENV VIRTUAL_ENV=/app/.venv \
3233
PATH="/app/.venv/bin:$PATH" \
3334
USER=app
3435

0 commit comments

Comments
 (0)