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.

  • NodeJS + Forever + Docker configuration doesn't work
  • Mongo daemon doesn't run by service mongod start
  • Docker Compose In Production
  • docker swarm port publishing not mapping
  • Move file from Docker container to Host system in Jenkins
  • GCE persistent disk, kubernetes, and data persistence
  • I think container reload this empty directory(./../php/core) from host and ignores second volume binding(./../core:/var/www/core)

    How use correctly?

  • Mean Stack Application Deployment Using Docker Failed
  • Kubernetes service in java does not resolve restarted service/replicationcontroller
  • cannot connect to JMX with Spring Boot and Docker
  • How to resolve Forbidden 403 error when making a urllib request with POST data in Django using Docker?
  • OSX 10.11.3 Install gitlab server using docker
  • Creating docker images on successful TeamCity build
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.