I want to add DAG files to Airflow, which runs in Docker on Ubuntu. I used the following git repository, containing the configuration and link to docker image. When I run docker run -d -p 8080:8080 puckel/docker-airflow webserver
, everything works fin. But I can't find a way to safely add DAGs to Airflow. Alternatively, I ran docker run -d -p 8080:8080 puckel/docker-airflow webserver -v /root/dags:/usr/local/airflow/dags
, no success either.
I tried to edit the /config/airflow.cfg
and add the git credentials to a repository containing dags, but no success. Also, added a folder /dags
in home/root/dags
, containing DAGs, assuming that this folder is shared with the Docker container. But no success either.
The Docker composer file contains the following volume settings:
webserver:
image: puckel/docker-airflow:1.10.0-2
...
volumes:
- ./dags:/usr/local/airflow/dags
But when I add stuff to ./dags
in the folder from where I run the Docker container, the DAGs don't appear in Airflow.
How can I safely add DAGs to Airflow when it runs in Docker?