Reputation: 1574
I am struggling to understand the following syntax in docker-compose yml for the volumes.
cache:
build: ../../
dockerfile: docker/dev/Dockerfile
volumes:
- /tmp/cache:/cache
- /build
entrypoint: "true"
The first volume /cache is clearly mounted to physical folder /tmp/cache on the host. Where is it mounted the second one /build instead? I could not find good references.
thanks.
Upvotes: 0
Views: 363
Reputation: 184
The second volume will be what is described as an anonymous volume. Usually they live under the /var/lib/docker
directory, unless you have made a different configuration.
I believe you will find this anwser useful.
Upvotes: 1
Reputation: 855
With one path this is a "anonymous" volume. Docker will create that value for you. You can read more here
Upvotes: 1