diff options
| author | 2025-02-15 16:31:55 +0000 | |
|---|---|---|
| committer | 2025-02-15 16:33:13 +0000 | |
| commit | 9699e6eee373e48f901a3993e562674855f54700 (patch) | |
| tree | 7ee501950cbc29df31a12d094590f644d9871073 /Dockerfile | |
| parent | Sort dependencies (diff) | |
Bump python-freeipa to 1.0.9
This required changing how we install deps in docker, as python-freeipa 1.0.9 added gssapi, which requires heimdal-dev to be installed.
We now install all project deps in the wheel-builder docker stage, and then install from cache in the actual runner stage
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -3,23 +3,27 @@ ARG python_version=3.13-slim FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:$python_version AS wheel-builder # Install build dependencies -RUN apt-get update && apt-get install --no-install-recommends -y libldap2-dev libsasl2-dev gcc && apt autoclean && rm -rf /var/lib/apt/lists/* - +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + libldap2-dev \ + libsasl2-dev \ + gcc \ + heimdal-dev \ + && apt autoclean && rm -rf /var/lib/apt/lists/* + +# Install project dependencies with build tools available COPY pyproject.toml poetry.lock ./ +RUN poetry install --without dev --with ldap --no-root -# Only the LDAP group has deps that requires gcc, so only build that for now -RUN poetry install --only ldap --no-root +# ------------------------------------------------------------------------------- FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:$python_version +COPY --from=wheel-builder /opt/poetry/cache /opt/poetry/cache RUN apt-get update && apt-get install --no-install-recommends -y libmagickwand-dev && rm -rf /var/lib/apt/lists/* +# Install dependencies from build cache WORKDIR /app - -# Copy the pre-built LDAP group from the build stage that required gcc -COPY --from=wheel-builder /opt/poetry/cache /opt/poetry/cache - -# Install the rest of the dependencies COPY pyproject.toml poetry.lock ./ RUN poetry install --without dev --with ldap --no-root |