I have a compose file like this
volumes:
postgres_data:
driver: local
datacube_data:
driver: local
datacube_source:
driver: local
services:
datacube:
container_name: datacube
build:
context: .
dockerfile: Dockerfile.datacube
# Keep the stdin open, so we can attach to our app container's process
stdin_open: true
# Enable sending signals (CTRL+C, CTRL+P + CTRL+Q) into the container:
tty: true
depends_on:
- db
volumes:
- datacube_source:/root/Datacube
And I have a Dockerfile which starts like this
WORKDIR /root/Datacube
RUN ls -lah /root/Datacube
When I build this I get an error
ls: cannot access /root/Datacube: No such file or directory
Why isn’t this volume mounted?