Im running the dockerfile https://github.com/puckel/docker-airflow/blob/master/Dockerfile
with this extra installtions
&& pip install pymongo[srv] \
&& pip install dnspython \
The log in built command say that was success
+ pip install dnspython
Collecting dnspython
Downloading dnspython-1.16.0-py2.py3-none-any.whl (188 kB)
Installing collected packages: dnspython
Successfully installed dnspython-1.16.0
But in airflow is impossible to see that dnspython was setup But from airflow is impossible to connect in Mongo from a Pythonoperator
ERROR - The "dnspython" module must be installed to use mongodb+srv:// URIs
import pymongo
import ssl
client = pymongo.MongoClient("mongodb+srv://user:password@host/test?retryWrites=true&w=majority", ssl=True, ssl_cert_reqs=ssl.CERT_NONE)
db = client.test
from my local machine is working