Kyle S
Kyle S

Reputation: 63

How do you specify a direct path volume in docker-compose.yml?

I am trying to sync a directory on my local machine to a docker container. I want to be able to read and modify a directory on my local machine from a docker container and those changes be seen on the local machine. Adding a relative path in the volumes section of the docker-compose.yml file works, but a direct path does not. Here is what I have

volumes:
      - ../../logs:/opt/airflow/logs

but what I want to do is

volumes:
     - /Users/bob/airflow/logs:/opt/airflow/logs

Upvotes: 0

Views: 568

Answers (1)

511234
511234

Reputation: 66

Go to your logs directory on your local machine and pwd to see if you have mistyped the absolute path.

Upvotes: 3

Related Questions