Skip to content

Commit 42f11d1

Browse files
committed
chore: update Dockerfile
- Improves layering to leverage.docker caching - Bumps poetry version to the latest stable
1 parent dc15a26 commit 42f11d1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Dockerfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
FROM python:3.13.2-slim AS base
22
WORKDIR /usr/src
3-
COPY . /usr/src/
43

54
FROM base AS scaffold
65
RUN apt-get update \
@@ -11,11 +10,14 @@ RUN apt-get update \
1110
&& pip install --upgrade pip
1211

1312
FROM scaffold AS dependencies
14-
RUN pip install poetry==1.5.0 \
13+
COPY pyproject.toml poetry.lock ./
14+
RUN pip install poetry==2.0.1 \
1515
&& poetry config virtualenvs.create false \
16-
&& poetry install --no-interaction --no-ansi
16+
&& poetry install --no-root --no-interaction --no-ansi
1717

1818
FROM dependencies AS final
19-
ENV PYTHONDONTWRITEBYTECODE 1
20-
ENV PYTHONUNBUFFERED 1
19+
ENV PYTHONDONTWRITEBYTECODE=1
20+
ENV PYTHONUNBUFFERED=1
21+
22+
COPY . /usr/src/
2123
RUN chmod +x start.sh

0 commit comments

Comments
 (0)