File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # syntax=docker/dockerfile:1
1+ # SPDX-FileCopyrightText: 2024 Heinz-Alexander Fütterer
2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ # syntax=docker/dockerfile:1.7
26
37# base
48# ----------------------------
5- FROM python:3.12-slim as base
9+ FROM python:3.12.3 -slim@sha256:fd3817f3a855f6c2ada16ac9468e5ee93e361005bd226fd5a5ee1a504e038c84 as base
610
711ENV PYTHONDONTWRITEBYTECODE=1 \
812 PYTHONUNBUFFERED=1 \
913 PIP_DISABLE_PIP_VERSION_CHECK=1 \
1014 PIP_NO_CACHE_DIR=1 \
15+ PIP_ONLY_BINARY=:all: \
1116 PIP_ROOT_USER_ACTION=ignore
1217
1318# build stage
1419# ----------------------------
1520FROM base as build
1621
22+ ENV BUILD_VERSION=1.2.1
23+
1724WORKDIR /app
1825
19- RUN python -m pip install build
26+ RUN python -m pip install --quiet build[uv]== "$BUILD_VERSION"
2027
2128COPY pyproject.toml .
2229COPY README.md .
2330COPY src ./src
2431
25- RUN python -m build --wheel
32+ RUN python -m build --installer=uv -- wheel
2633
2734# runtime stage
2835# ----------------------------
@@ -32,11 +39,9 @@ ARG VERSION
3239
3340RUN adduser --group --system --no-create-home re3data
3441
35- WORKDIR /app
36-
3742COPY --from=build /app/dist ./dist
3843
39- RUN python -m pip install "./dist/python_re3data-$VERSION-py3-none-any.whl[cli]"
44+ RUN python -m pip install --quiet "./dist/python_re3data-$VERSION-py3-none-any.whl[cli]" && rm -rf ./dist
4045
4146USER re3data
4247
You can’t perform that action at this time.
0 commit comments