Skip to content

Commit ea6a354

Browse files
committed
feat: slim down image
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
1 parent 7940594 commit ea6a354

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM python:3.7 AS base
1+
FROM python:3.7-slim-bullseye AS base
22
WORKDIR /app
33

44
# Install and configure poetry
55
ENV POETRY_VERSION=1.1.11
66
ENV POETRY_HOME=/opt/poetry
7+
RUN apt update && apt install -y curl && apt clean
78
RUN curl -sSL https://install.python-poetry.org | python -
89

910
ENV PATH="/opt/poetry/bin:$PATH"
@@ -14,10 +15,12 @@ RUN mkdir src && touch src/__init__.py
1415
COPY pyproject.toml poetry.lock README.md ./
1516
RUN poetry install --no-dev -E server
1617

17-
FROM python:3.7
18+
FROM python:3.7-slim-bullseye
19+
LABEL healthcheck="nc -z 127.0.0.1 80"
1820
WORKDIR /app
1921
COPY --from=base /app/.venv /app/.venv
2022
ENV PATH="/app/.venv/bin:$PATH"
23+
RUN apt update && apt install -y netcat && apt clean
2124
EXPOSE 80
2225

2326
COPY src src

0 commit comments

Comments
 (0)