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 containers, memory consumption and logs
  • Google Cloud components not being enabled
  • Cannot stop a cloudera/quickstart in Docker
  • Network name of containers on multiple bridges
  • RUnit does not stop docker-compose's containers
  • headless watir webdriver tests unable to find firefox
  • I think container reload this empty directory(./../php/core) from host and ignores second volume binding(./../core:/var/www/core)

    How use correctly?

  • Docker: mounting volume and run node apps
  • How to access a docker container running on MacOSX from another host?
  • Deploying scala app as a docker container
  • Docker publish not working correctly for golang application
  • Running Spring Boot Microservices using Docker and AWS ECS
  • Can access to Bluemix container registry be access controlled?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.