Skip to content

Commit

Permalink
Dockerfile: Update virtualenv, pyinstaller, poetry and poetry plugins…
Browse files Browse the repository at this point in the history
… + more specific python base image tag (#67)

* Dockerfile: Update virtualenv, pyinstaller and poetry

* Dockerfile: Update poetry plugins + specific python-alpine tag for builder

* Update Dockerfile

* Using tag python:3.12.8-alpine3.21

* Update Dockerfile
  • Loading branch information
LawiK974 authored Dec 29, 2024
1 parent 33ae1b8 commit db44438
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Stage 1: Builder stage where the package is built using Poetry
FROM python:alpine AS builder
FROM python:3.12.8-alpine3.21 AS builder

ENV PYTHONUNBUFFERED=1 REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
WORKDIR /app
COPY . /app
RUN apk add --no-cache gcc musl-dev libffi-dev git \
&& pip install poetry==1.8.3 pyinstaller==6.8.0 virtualenv==20.26.2 && \
&& pip install poetry==1.8.5 pyinstaller==6.11.1 virtualenv==20.28.0 && \
# Install poetry version plugin see https://github.com/tiangolo/poetry-version-plugin
poetry self add "poetry-dynamic-versioning[plugin]==v1.3.0" && \
poetry self add "poetry-pyinstaller-plugin==1.1.10" && \
poetry self add "poetry-dynamic-versioning[plugin]==v1.4.1" && \
poetry self add "poetry-pyinstaller-plugin==1.2.1" && \
# Build the package (this creates the package wheel)
poetry build

Expand All @@ -19,7 +19,7 @@ COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certifi
COPY --from=builder /app/dist/pyinstaller/*/* /usr/local/bin/
# get necessary libc libraries
COPY --from=builder /lib/ld-musl-*.so.1 /lib/
COPY --from=builder /lib/libz.so.1 /lib/libz.so.1
COPY --from=builder /usr/lib/libz.so.1 /lib/libz.so.1
RUN export ARCH=$(uname -m) && \
ln -snf "/lib/ld-musl-${ARCH}.so.1" "/lib/libc.musl-${ARCH}.so.1" && \
chmod a+rx /usr/local/bin/kube-notify && \
Expand Down

0 comments on commit db44438

Please sign in to comment.