Skip to content

Commit 6b3da10

Browse files
committed
fix(airflow): Explicitly install python version, and call python with the version
Also ignore lint warning about pinning pip packages.
1 parent 8af4863 commit 6b3da10

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.hadolint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ ignored:
1010
# Reason: We use buildx which handles the build graph, no explicit image tags necessary
1111
- DL3006
1212

13+
# Warning: Pin versions in pip.
14+
# https://github.com/hadolint/hadolint/wiki/DL3006
15+
# Reason: So far we haven't pinned versions. If we decide to, we should do that as a separate piece of work.
16+
- DL3013
17+
1318
# Warning: Use the -y switch to avoid manual input dnf install -y <package>
1419
# https://github.com/hadolint/hadolint/wiki/DL3038
1520
# Reason: We set `assumeyes=True` in dnf.conf in our base image

airflow/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RUN microdnf update && \
3333
libpq-devel \
3434
openldap-devel \
3535
openssl-devel \
36+
python${PYTHON} \
3637
python${PYTHON}-devel \
3738
python${PYTHON}-pip \
3839
python${PYTHON}-wheel \
@@ -41,7 +42,7 @@ RUN microdnf update && \
4142
microdnf clean all && \
4243
rm -rf /var/cache/yum
4344

44-
RUN python3 -m venv --system-site-packages /stackable/app && \
45+
RUN python${PYTHON} -m venv --system-site-packages /stackable/app && \
4546
source /stackable/app/bin/activate && \
4647
pip install --no-cache-dir --upgrade pip && \
4748
pip install --no-cache-dir apache-airflow[${AIRFLOW_EXTRAS}]==${PRODUCT} --constraint /tmp/constraints.txt && \

0 commit comments

Comments
 (0)