title: Docker - Mount a volume from a container to an other (equivalent volumes_from) in docker-compose 3
body: <p>I've two containers : <strong>nginx</strong> &amp; <strong>angular</strong>. The <strong>angular</strong> container contains the code and is automatically pulled from the registry when there is a new version (with watchtower).</p>
  
  <p>I set up a Shared Volume between <strong>angular</strong> &amp; <strong>nginx</strong> to share the code from <strong>angular</strong> to <strong>nginx</strong>.</p>
  
  <pre><code>  ### Angular #########################################
    angular:
      image: registry.gitlab.com/***/***:staging
      networks:
        - frontend
        - backend
      volumes:
        - client:/var/www/client
  
    ### NGINX Server #########################################
    nginx:
      image: registry.gitlab.com/***/***/***:staging
      volumes:
        - client:/var/www/client
      depends_on:
        - angular
      networks:
        - frontend
        - backend
  
  volumes:
    client:
  networks:
    backend:
    frontend:
  </code></pre>
  
  <p>When I build &amp; run for the first time the environment, everything works.
  The problem is when there is a new version of the <strong>client</strong>, the image is pulled, the container is re-built and the new code version is inside the <strong>angular</strong> container, but in the <strong>nginx</strong> container it still the old code version of the <strong>client</strong>.</p>
  
  <p>The shared volumes does not let me do what i want because we can not specify who is the host, is it possible to mount a volumes from a container to an other ?</p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The <strong>angular</strong> container is only here to serve the files. We could rsync the built application to the server on the host machine then mouting the volume to the container (host -> guest) but it would go against our CI process : <strong>build app</strong>-><strong>build image</strong>-><strong>push to registry</strong>-><strong>watchtower pull new image</strong></p>