til.duyet.net
Search…
Extend official Docker image
1
FROM apache/airflow:2.3.0
2
​
3
# Add apt package for python packages the required extra c++ libs, ...
4
USER root
5
RUN apt-get update \
6
&& apt-get install -y --no-install-recommends \
7
vim openjdk-11-jre-headless \
8
&& apt-get autoremove -yqq --purge \
9
&& apt-get clean \
10
&& rm -rf /var/lib/apt/lists/*
11
12
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
13
​
14
# Install custom python libs
15
USER airflow
16
RUN pip install --no-cache-dir lxml apache-airflow-providers-apache-spark==2.1.3
17
​
18
# Embed DAGs code into docker
19
COPY --chown=airflow:root ./dags /opt/airflow/dags
Copied!
​
Copy link
Edit on GitHub