-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
executable file
·50 lines (30 loc) · 1.04 KB
/
Dockerfile
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
45
46
47
48
49
FROM apache/airflow:2.10.0-python3.10
USER root
ARG AIRFLOW_HOME=/opt/airflow
ADD dags /opt/airflow/dags
ADD airflow.cfg /opt/airflow/airflow.cfg
USER airflow
RUN pip install --upgrade pip
USER root
# MySQL key rotation (https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html)
# RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C
RUN apt-get update -y
RUN apt-get install git -y
RUN apt-get install lftp -y
RUN apt-get install zip -y
RUN apt-get install wget -y
RUN apt-get install p7zip-full -y
RUN apt-get install nano -y
RUN apt-get install jq -y
RUN apt-get install libmagic1 -y
RUN chown -R "airflow:root" /opt/airflow/
ADD ssh /home/airflow/.ssh/
RUN chown -R airflow:root /home/airflow/.ssh
USER airflow
RUN pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org boto3
# USER ${AIRFLOW_UID}
USER airflow
ADD requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
RUN git config --global user.email "your email"
RUN git config --global user.name "your username"