44# - SecretsUsedInArgOrEnv : OPA_AUTH_MANAGER is a false positive and breaks the build.
55
66ARG GIT_SYNC_VERSION
7+ ARG UV_VERSION
78
89# For updated versions check https://github.com/kubernetes/git-sync/releases
910# which should contain a image location (e.g. registry.k8s.io/git-sync/git-sync:v3.6.8)
1011FROM oci.stackable.tech/sdp/git-sync/git-sync:${GIT_SYNC_VERSION} AS gitsync-image
1112
13+ # TODO (@NickLarsenNZ): Get the image into our registry
14+ FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv-image
15+
1216FROM local-image/shared/statsd-exporter AS statsd_exporter-builder
1317
1418FROM local-image/vector AS opa-auth-manager-builder
1519
1620ARG OPA_AUTH_MANAGER
1721ARG PYTHON_VERSION
18- ARG UV_VERSION
22+ ARG STACKABLE_USER_UID
1923
2024COPY airflow/opa-auth-manager/${OPA_AUTH_MANAGER} /tmp/opa-auth-manager
2125
2226WORKDIR /tmp/opa-auth-manager
2327
24- RUN <<EOF
25- microdnf update
26- microdnf install python3-pip
27- microdnf clean all
28-
29- pip install --no-cache-dir uv==${UV_VERSION}
28+ COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
3029
30+ RUN <<EOF
3131# This folder is required by the tests to set up an sqlite database
3232mkdir /root/airflow
3333
@@ -46,7 +46,6 @@ ARG STACKABLE_USER_UID
4646ARG NODEJS_VERSION
4747ARG S3FS_VERSION
4848ARG CYCLONEDX_BOM_VERSION
49- ARG UV_VERSION
5049
5150# Airflow "extras" packages are listed here: https://airflow.apache.org/docs/apache-airflow/stable/extra-packages-ref.html
5251# They evolve over time and thus belong to the version-specific arguments.
@@ -62,6 +61,8 @@ ARG AIRFLOW_EXTRAS_EXTERNAL_SERVICES=""
6261ARG AIRFLOW_EXTRAS_LOCALLY_INSTALLED_SOFTWARE=""
6362ARG AIRFLOW_EXTRAS_OTHER=""
6463
64+ COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
65+
6566RUN microdnf update && \
6667 microdnf install \
6768 cyrus-sasl-devel \
@@ -77,9 +78,9 @@ RUN microdnf update && \
7778 libpq-devel \
7879 openldap-devel \
7980 openssl-devel \
80- python3 \
81- python3-devel \
82- python3-pip \
81+ # python3 \
82+ # python3-devel \
83+ # python3-pip \
8384 # python${PYTHON_VERSION}-wheel \
8485 # The airflow odbc provider can compile without the development files (headers and libraries) (see https://github.com/stackabletech/docker-images/pull/683)
8586 unixODBC \
@@ -110,12 +111,6 @@ AIRFLOW_EXTRAS="$AIRFLOW_EXTRAS_CORE,$AIRFLOW_EXTRAS_META,$AIRFLOW_EXTRAS_PROVID
110111# Removing duplicates
111112AIRFLOW_EXTRAS=$(echo "$AIRFLOW_EXTRAS" | tr ',' '\n ' | awk 'NF > 0 {if (!seen[$0]++) print $0}' | tr '\n ' ',' | sed 's/,$//' )
112113
113- # TODO: Use uv ${UV_VERSION} from Nexus instead of pip
114- # Upgrade pip to the latest version
115- # Also install uv to get support for build constraints and venv for a given python version
116- pip install --no-cache-dir --upgrade pip
117- pip install --no-cache-dir uv==${UV_VERSION}
118-
119114uv venv --python "${PYTHON_VERSION}" --system-site-packages /stackable/app
120115source /stackable/app/bin/activate
121116
@@ -201,7 +196,6 @@ ARG TINI_VERSION
201196ARG TARGETARCH
202197ARG SHARED_STATSD_EXPORTER_VERSION
203198ARG STACKABLE_USER_UID
204- ARG UV_VERSION
205199
206200LABEL name="Apache Airflow" \
207201 maintainer="info@stackable.tech" \
@@ -227,8 +221,7 @@ COPY --from=gitsync-image --chown=${STACKABLE_USER_UID}:0 /git-sync ${HOME}/git-
227221
228222COPY airflow/licenses /licenses
229223
230- # TODO (@NickLarsenNZ): Get the image into our registry
231- COPY --from=ghcr.io/astral-sh/uv:0.9.10 --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
224+ COPY --from=uv-image --chown=${STACKABLE_USER_UID}:0 /uv /uvx /bin/
232225
233226# Update image and install needed packages
234227RUN <<EOF
0 commit comments