How mount subdirectory in mounted directory in Docker?

I’m using this docker-compose file:

version: '2'

        container_name: "php"
        build: ./php
           - ./../php:/var/www
           - ./../core:/var/www/core

./../php – does not have core dir. After starting everything is ok. But after 5 seconds /var/www/core is empty and I see empty core directory inside ./../php/core.

  • Docker Quickstart Terminal crash on Mac OS X
  • Docker can't find OpenJDK
  • How to start a wide browser inside a docker container, for Protractor testing
  • Docker unable to start
  • Accessing MySQL Database on Host Machine from within Dockers Container
  • Registering an ELB to an ECS service with random host port
  • I think container reload this empty directory(./../php/core) from host and ignores second volume binding(./../core:/var/www/core)

    How use correctly?

  • For dummies approach to build image and run own code on Docker
  • Registry: Error pushing to registry: Authentication is required
  • How to use docker for deployment and development?
  • systemd, docker, or systemd-journal (on stable CoreOS) using high CPU
  • AWS - Beanstalk
  • No output when running spark NetworkWordCount example
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.