@@ -18,12 +18,12 @@ ARG PYTHON_IMG_TAG=3.10
18
18
19
19
20
20
FROM docker.io/python:${PYTHON_IMG_TAG}-slim-bookworm as base
21
+ ARG COMMIT_REF
21
22
ARG PYTHON_IMG_TAG
22
- ARG PKG_VERSION
23
23
24
24
LABEL org.hotosm.osm-rawdata.python-img-tag="${PYTHON_IMG_TAG}" \
25
- org.hotosm.osm-rawdata.maintainer ="${MAINTAINER }" \
26
- org.hotosm.osm-rawdata.version ="${PKG_VERSION }"
25
+ org.hotosm.osm-rawdata.commit-ref ="${COMMIT_REF }" \
26
+ org.hotosm.osm-rawdata.maintainer ="${MAINTAINER }"
27
27
RUN set -ex \
28
28
&& apt-get update \
29
29
&& DEBIAN_FRONTEND=noninteractive apt-get install \
@@ -51,7 +51,6 @@ RUN pdm export --prod > requirements.txt \
51
51
52
52
53
53
FROM base as build-wheel
54
- ARG PKG_VERSION
55
54
WORKDIR /build
56
55
COPY . .
57
56
RUN pip install pdm==2.6.1 \
@@ -60,7 +59,6 @@ RUN pip install pdm==2.6.1 \
60
59
61
60
62
61
FROM base as build
63
- ARG PKG_VERSION
64
62
WORKDIR /opt/python
65
63
RUN set -ex \
66
64
&& apt-get update \
@@ -79,9 +77,10 @@ COPY --from=extract-deps \
79
77
RUN pip install --user --no-warn-script-location \
80
78
--no-cache-dir -r ./requirements.txt
81
79
COPY --from=build-wheel \
82
- "/build/dist/osm_rawdata-$PKG_VERSION-py3-none-any.whl" .
83
- RUN pip install --user --no-warn-script-location \
84
- --no-cache-dir "/opt/python/osm_rawdata-$PKG_VERSION-py3-none-any.whl"
80
+ "/build/dist/*-py3-none-any.whl" .
81
+ RUN whl_file=$(find . -name '*-py3-none-any.whl' -type f) \
82
+ && pip install --user --no-warn-script-location \
83
+ --no-cache-dir "${whl_file}"
85
84
86
85
87
86
0 commit comments