1
- FROM apache/airflow:2.7.1-python3.10
1
+ # for dev: docker build -t ghcr.io/gestaogovbr/airflow2-docker:latest-dev --build-arg dev_build=true .
2
2
3
- ARG PYTHON_DEPS=" \
4
- ctds==1.12.0 \
5
- tqdm==4.60.0 \
6
- ijson==3.0.4 \
7
- pysmb==1.2.6 \
8
- xlrd==1.2.0 \
9
- pygsheets==2.0.5 \
10
- ipdb==0.13.3 \
11
- py-trello==0.17.1 \
12
- PyPDF2==1.26.0 \
13
- frictionless==5.11.1 \
14
- great-expectations==0.17.2 \
15
- unidecode==1.2.0 \
16
- odfpy==1.4.1 \
17
- openpyxl==3.0.7 \
18
- pytest==6.2.5 \
19
- ckanapi==4.6 \
20
- sharepy==1.3.0 \
21
- Office365-REST-Python-Client==2.3.14 \
22
- GeoAlchemy2==0.10.2 \
23
- acryl-datahub-airflow-plugin==0.10.4 \
24
- geopandas==0.12.2 \
25
- "
3
+ FROM apache/airflow:2.7.3-python3.10
26
4
27
5
USER root
28
6
RUN apt-get update \
@@ -38,7 +16,7 @@ RUN apt-get update \
38
16
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add --no-tty - \
39
17
&& curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list \
40
18
&& apt-get update -yqq \
41
- && ACCEPT_EULA=Y apt-get install -yqq msodbcsql17 \
19
+ && ACCEPT_EULA=Y apt-get install -yqq msodbcsql17 mssql-tools \
42
20
&& sed -i 's,^\( MinProtocol[ ]*=\) .*,\1 ' TLSv1.0',g' /etc/ssl/openssl.cnf \
43
21
&& sed -i 's,^\( CipherString[ ]*=\) .*,\1 ' DEFAULT@SECLEVEL=1',g' /etc/ssl/openssl.cnf \
44
22
&& curl -O http://acraiz.icpbrasil.gov.br/credenciadas/CertificadosAC-ICP-Brasil/ACcompactado.zip \
@@ -63,24 +41,33 @@ RUN curl https://ssltools.digicert.com/chainTester/webservice/validatecerts/cert
63
41
64
42
USER airflow
65
43
66
- RUN if [ -n "${PYTHON_DEPS}" ]; \
67
- then pip install --no-cache-dir --user ${PYTHON_DEPS}; \
68
- fi \
69
- && mkdir /opt/airflow/export-data
44
+ WORKDIR /opt/airflow
70
45
71
- RUN pip install --no-cache-dir --user \
72
- apache-airflow[jdbc,microsoft.mssql,samba,google_auth,odbc,sentry] \
46
+ COPY requirements-uninstall.txt .
47
+ COPY requirements-cdata-dags.txt .
48
+
49
+ RUN pip uninstall -y -r requirements-uninstall.txt && \
50
+ pip install --no-cache-dir --user -r requirements-cdata-dags.txt && \
51
+ pip install --no-cache-dir --user -r \
52
+ https://raw.githubusercontent.com/gestaogovbr/Ro-dou/main/requirements.txt && \
53
+ pip install --no-cache-dir --user \
54
+ apache-airflow[jdbc,microsoft.mssql,samba,odbc,sentry] \
73
55
apache-airflow-providers-docker \
74
56
apache-airflow-providers-common-sql \
75
- apache-airflow-providers-telegram
57
+ apache-airflow-providers-telegram \
58
+ acryl-datahub-airflow-plugin==0.10.4
76
59
77
60
ARG dev_build="false"
78
61
RUN \
79
62
if [[ "${dev_build}" == "false" ]] ; \
80
63
then pip install --no-cache-dir --user apache-airflow-providers-fastetl; \
81
64
else \
82
- echo ***apache-airflow-providers-fastetl not installed*** ; \
65
+ echo ***apache-airflow-providers-fastetl not installed*** && \
66
+ pip install --no-cache-dir --user -r https://raw.githubusercontent.com/gestaogovbr/FastETL/main/requirements.txt ; \
83
67
fi
84
68
85
69
RUN while [[ "$(curl -s -o /tmp/thawte.pem -w ''%{http_code}'' https://ssltools.digicert.com/chainTester/webservice/validatecerts/certificate?certKey=issuer.intermediate.cert.98&fileName=Thawte%20RSA%20CA%202018&fileExtension=txt)" != "200" ]]; do sleep 1; done
86
70
RUN cat /tmp/thawte.pem >> /home/airflow/.local/lib/python3.10/site-packages/certifi/cacert.pem
71
+ RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc && \
72
+ source ~/.bashrc
73
+ RUN rm ACcompactado.zip requirements-cdata-dags.txt requirements-uninstall.txt
0 commit comments