0

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.

toto'
  • 1,325
  • 1
  • 17
  • 36

2 Answers2

1

With one path this is a "anonymous" volume. Docker will create that value for you. You can read more here

GintsGints
  • 807
  • 7
  • 15
1

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.

K. Railis
  • 186
  • 3
  • 8