-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 1.54 KB
/
Copy pathDockerfile
File metadata and controls
37 lines (26 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM --platform=linux/amd64 apache/airflow:slim-2.10.5-python3.11
ARG AIRFLOW_VERSION=2.10.5
USER root
# `apt-get autoremove` is used to remove packages that were automatically installed to satisfy
# dependencies for other packages and are now no longer needed.
# `apt-get clean` clears out the local repository of retrieved package files
RUN apt-get update \
&& apt-get install -y --no-install-recommends gcc libc6-dev libcurl4-openssl-dev libssl-dev git \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --chown=airflow:airflow airflow_services/requirements.txt "${AIRFLOW_HOME}/requirements.txt"
COPY --chown=airflow:airflow airflow_services/requirements-in.txt "${AIRFLOW_HOME}/requirements-in.txt"
USER airflow
RUN uv pip install virtualenv\
&& uv pip install --no-cache-dir -r requirements.txt -c "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.11.txt"\
&& uv pip install --no-cache-dir -r requirements-in.txt apache-airflow==${AIRFLOW_VERSION}
ENV PATH=".venv/bin:$PATH"
COPY --chown=airflow:airflow dags "${AIRFLOW_HOME}/dags"
COPY --chown=airflow:airflow plugins "${AIRFLOW_HOME}/plugins"
COPY --chown=airflow:airflow infrastructure/configuration "${AIRFLOW_HOME}/configuration"
COPY --chown=airflow:airflow scripts "${AIRFLOW_HOME}/scripts"
COPY --chown=airflow:airflow airflow_services/webserver_config.py "${AIRFLOW_HOME}/webserver_config.py"
RUN cp ${AIRFLOW_HOME}/configuration/airflow.cfg* ${AIRFLOW_HOME}/.
#ENV
ENV PYTHONPATH="/opt/airflow"