Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Lavish Gupta <146554957+lavishiamops@users.noreply.github.com>
  • Loading branch information
lavishiamops authored Oct 8, 2024
1 parent f5d9188 commit cb3e3c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ RUN --mount=type=secret,id=GEOIPUPDATE_ACCOUNT_ID \

# Stage 5: Python dependencies
FROM cgr.dev/chainguard/wolfi-base AS python-deps
ARG PYTHON_VERSION=3.12.2

WORKDIR /ak-root/poetry

Expand All @@ -96,7 +97,7 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloa
RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
apt-get update && \
# Required for installing pip packages
apt-get install -y --no-install-recommends build-essential pkg-config libxmlsec1-dev zlib1g-dev libpq-dev
apt-get install -y --no-install-recommends python${PYTHON_VERSION} python${PYTHON_VERSION}-pip build-essential pkg-config libxmlsec1-dev zlib1g-dev libpq-dev

RUN --mount=type=bind,target=./pyproject.toml,src=./pyproject.toml \
--mount=type=bind,target=./poetry.lock,src=./poetry.lock \
Expand All @@ -109,7 +110,7 @@ RUN --mount=type=bind,target=./pyproject.toml,src=./pyproject.toml \
poetry install --only=main --no-ansi --no-interaction --no-root"

# Stage 6: Run
FROM cgr.dev/chainguard/wolfi-base AS final-image
FROM docker.io/python:3.12.2-slim-bookworm AS final-image

ARG GIT_BUILD_HASH
ARG VERSION
Expand Down

0 comments on commit cb3e3c8

Please sign in to comment.