-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
34 lines (25 loc) · 897 Bytes
/
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
FROM apache/airflow:2.6.3-python3.10
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
unixodbc-dev \
libpq-dev \
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add --no-tty - \
&& curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update -yqq \
&& ACCEPT_EULA=Y apt-get install -yqq msodbcsql17 \
&& apt-get autoremove -yqq --purge \
&& apt-get clean
COPY . /opt/airflow/fastetl
RUN chown -R airflow /opt/airflow/fastetl
USER airflow
RUN pip install --no-cache-dir --user \
apache-airflow[microsoft.mssql,odbc,samba] \
apache-airflow-providers-common-sql \
pytest==6.2.5 \
/opt/airflow/fastetl \
&& rm -rf /opt/airflow/fastetl
RUN airflow db init
ENTRYPOINT airflow scheduler
EXPOSE 8080