Skip to content

Commit 7addf4b

Browse files
committed
update Dockerfile
1 parent 122ed43 commit 7addf4b

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

airflow/Dockerfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Pulled Feb 6, 2023
2-
FROM --platform=linux/amd64 python:3.8@sha256:3e6443f94e3c82d4cce045f777042c67cff0fa3cdaa55b3ac7c36101e9b0405c
2+
ARG BASE_IMAGE=python:3.8@sha256:3e6443f94e3c82d4cce045f777042c67cff0fa3cdaa55b3ac7c36101e9b0405c
33

4+
FROM --platform=linux/amd64 $BASE_IMAGE as base
5+
WORKDIR /srv
6+
RUN curl -LsSf https://astral.sh/uv/0.6.14/install.sh | XDG_BIN_HOME=/usr/local/bin sh
7+
COPY pyproject.toml uv.lock ./
8+
RUN uv export --no-dev --no-emit-project > requirements.txt
9+
10+
FROM --platform=linux/amd64 $BASE_IMAGE
411
ARG KNESSET_DATA_PIPELINES_VERSION=467962784b807d7882b6ec6b7d9217afd19482d2
512
RUN cd /opt &&\
613
curl -LO "https://github.com/hasadna/knesset-data-pipelines/archive/${KNESSET_DATA_PIPELINES_VERSION}.zip" &&\
@@ -13,11 +20,12 @@ ENV KNESSET_DATA_PIPELINES_AIRFLOW_ROOT_DIR=/srv
1320

1421
WORKDIR /srv
1522
COPY bin/ bin/
16-
COPY requirements.txt ./
23+
COPY --from=base /srv/requirements.txt ./
1724
RUN pip install --upgrade pip "setuptools==70" wheel && bin/pip_install_airflow.sh
1825
COPY dags/ dags/
26+
COPY pipelines/ pipelines/
1927
COPY knesset_data_pipelines/ knesset_data_pipelines/
20-
COPY setup.py ./
28+
COPY pyproject.toml ./
2129
RUN pip install -e .
2230

2331
ENV AIRFLOW_HOME=/var/airflow

0 commit comments

Comments
 (0)