title: Docker-compose volume mount before run
body: <p>I have a Dockerfile I'm pointing at from a docker-compose.yml.</p>
  
  <p>I'd like the volume mount in the docker-compose.yml to happen before the <code>RUN</code> in the Dockerfile. </p>
  
  <p>Dockerfile:</p>
  
  <pre><code>FROM node
  
  WORKDIR /usr/src/app
  
  RUN npm install --global gulp-cli \
   &amp;&amp; npm install
  
  ENTRYPOINT gulp watch
  </code></pre>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: '2'
  
  services:
    build_tools:
      build: docker/gulp
      volumes_from:
        - build_data:rw
  
    build_data:
      image: debian:jessie
      volumes:
        - .:/usr/src/app
  </code></pre>
  
  <p>It makes complete sense for it to do the Dockerfile first, then mount from docker-compose, however is there a way to get around it.</p>
  
  <p>I want to keep the Dockerfile generic, while passing more specific bits in from compose. Perhaps that's not the best practice?</p>