How do I put application_default_credentials.json from Google cloud to Docker-compose

Hello,

I’m new to docker-compose. I’m learning to run Airflow using docker-compose. I’m trying to connect to my google cloud. However, when I trigger DAG, I found an error message raise exceptions.DefaultCredentialsError(
google.auth.exceptions.DefaultCredentialsError: File application_default_credentials.json was not found.

I have tried several attempts by putting application_default_credentials.json file in the dags folder, config folder but I still get an error. After googling about this error, I think I need to mount the application_default_credentials.json to docker.

Does anybody can help me with this?

Thanks

Check the Docker compose docs for volumes, probably use a “bind mount”.