title: docker-compose up not adding code to remote container
body: <p>I've run through the initial <a href="https://docs.docker.com/compose/" rel="nofollow">Overview of Docker Compose</a> exactly as written and it works just fine locally with boot2docker. However, if I try to do a <code>docker-compose up</code> on a remote host, it does not add the code to the remote container.</p>
  
  <p>To reproduce:</p>
  
  <ol>
  <li>Run through the initial <a href="https://docs.docker.com/compose/" rel="nofollow">Overview of Docker Compose</a> exactly as written.</li>
  <li>Install <a href="https://docs.docker.com/machine/" rel="nofollow">Docker Machine</a> and start a Dockerized VM on any cloud provider.
  <ol>
  <li><code>docker-machine create --driver my-favourite-cloud composetest</code></li>
  <li><code>eval "$(docker-machine env composetest)"</code></li>
  </ol></li>
  <li>Now that you're working with a remote host, run <code>docker-compose up</code> on the original code.
  <ol>
  <li><code>composetest $ docker-compose up</code></li>
  </ol></li>
  </ol>
  
  <p>Redis runs fine but the Flask app does not.</p>
  
  <pre><code>composetest $ docker ps -a
  CONTAINER ID        IMAGE               COMMAND                CREATED              STATUS                          PORTS               NAMES
  794c90928b97        composetest_web     "/bin/sh -c 'python    About a minute ago   Exited (2) About a minute ago                       composetest_web_1
  2c70bd687dfc        redis               "/entrypoint.sh redi   About a minute ago   Up About a minute               6379/tcp            composetest_redis_1
  </code></pre>
  
  <p>What went wrong?</p>
  
  <pre><code>composetest $ docker logs 794c90928b97
  python: can't open file 'app.py': [Errno 2] No such file or directory
  </code></pre>
  
  <p>Can we confirm it?</p>
  
  <pre><code>composetest $ docker-compose run -d  web sleep 60
  Starting composetest_redis_1...
  composetest_web_run_3
  
  composetest $ docker exec -it a4 /bin/bash
  root@a4a73c6dd159:/code# ls -a
  .  ..
  </code></pre>
  
  <p>Nothing there. Can we fix it?</p>
  
  <p>Comment out volumes in <code>docker-compose.yml</code></p>
  
  <pre><code>web:
    build: .
    ports:
     - "5000:5000"
    # volumes:
    #  - .:/code
    links:
     - redis
  redis:
    image: redis
  </code></pre>
  
  <p>Then just <code>docker-compose up</code> and it works! </p>
  
  <p>Let's try again on boot2docker.</p>
  
  <pre><code>composetest $ eval "$(boot2docker shellinit)"
  composetest $ docker-compose up
  Recreating composetest_redis_1...
  Recreating composetest_web_1...
  Attaching to composetest_redis_1, composetest_web_1
  ...
  </code></pre>
  
  <p>The Flask app does work but it has a serious problem. If you change app.py, the Flask dev server doesn't reload and those changes aren't automatically seen. Even if you stop the container and <code>docker-compose up</code> again, the changes still aren't seen. I realize we lose this <strong>essential</strong> feature because the volume is no longer mounted. But not mounting the volume is the only way I've been able to get docker-compose to work with a remote host. We should be able to get both local and remote hosts to work using the same <code>docker-compose.yml</code> and <code>Dockerfile</code>.</p>
  
  <p>How do I develop interactively with a local VM and deploy to a remote VM without having to change the Dockerfile or docker-compose.yml?</p>
  
  <p>Versions:</p>
  
  <ul>
  <li>Docker 1.7.0</li>
  <li>Docker Compose 1.3.0</li>
  <li>Docker Machine 0.3.0</li>
  </ul>