For this you do not need ${PWD} , you can just make the path relative and compound, it will expand it (one main difference between layout paths and processed docker run ).
version: '2' services: couchpotato: build: context: ./couchpotato dockerfile: Dockerfile ports: - 5050:5050 volumes: - "./couchpotato/data:/home/CouchPotato/data/" - "./couchpotato/config:/home/CouchPotato/config/"
As to why compose does not see this variable, it depends on your shell. Compose looks for the exported environment variable, the contents of the .env file, and command line flags for the docker-compose command. If each of them turns out to be empty for the variable, you will receive this warning.
source share