-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile-airflow
More file actions
44 lines (37 loc) · 1.39 KB
/
Dockerfile-airflow
File metadata and controls
44 lines (37 loc) · 1.39 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
38
39
40
41
42
43
44
FROM apache/airflow:3.1.7-python3.12
# See https://airflow.apache.org/docs/docker-stack/build.html
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libpq-dev \
libpq5 \
apt-utils \
build-essential \
ca-certificates \
curl \
git \
gnupg \
lsb-release \
wget \
unzip \
libkrb5-dev \
&& apt-get autoremove -yqq --purge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
USER airflow
WORKDIR /home/airflow/
COPY --chown=airflow:airflow pyproject.toml ./pyproject.toml
COPY --chown=airflow:airflow databridge_etl_tools ./databridge_etl_tools
COPY --chown=airflow:airflow tests/ ./tests/
# Python syntax check
RUN python -m compileall ./databridge_etl_tools
# Dedicated sandbox for Openmetadata library
RUN python -m venv /home/airflow/venvs/om && \
/home/airflow/venvs/om/bin/pip install "openmetadata-ingestion==1.12.1" "cachetools" "pendulum"
# Dedicated sandbox for ArcGIS library
RUN python -m venv /home/airflow/venvs/arcgis && \
/home/airflow/venvs/arcgis/bin/pip install "pendulum" "arcgis"
# Install databridge-etl-tools using pyproject.toml
RUN pip install --no-cache-dir "apache-airflow==${AIRFLOW_VERSION}" \
"apache-airflow-providers-amazon[s3fs]" .
# --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.12.txt" .