title: running docker-compose on a docker-machine
body: <p>I'm trying to deploy two services on a single ec2 instance with docker-machine and docker-compose.</p>
  
  <p>Here's what I'm doing:</p>
  
  <pre><code>docker-machine create --driver amazonec2 --engine-install-url=https://web.archive.org/web/20170623081500/https://get.docker.com mymachine
  
  docker-machine ssh mymachine -- mkdir -p /home/ubuntu/myapp
  
  git clone https://github.com/myapp/service1.git
  docker-machine scp -r ./service1 mymachine:/home/ubuntu/myapp/
  rm -rf ./service1
  
  git clone https://github.com/myapp/service2.git
  docker-machine scp -r ./service2 mymachine:/home/ubuntu/myapp/
  rm -rf ./service2
  
  docker-machine env mymachine
  //export DOCKER_TLS_VERIFY="1"
  //export DOCKER_HOST="something"
  //export DOCKER_CERT_PATH="something"
  //export DOCKER_MACHINE_NAME="mymachine"
  
  eval $(docker-machine env mymachine)
  
  docker-machine active
  //mymachine
  
  docker-compose -f ./docker-compose-prod.yml up -d
  </code></pre>
  
  <p>I get this error: <code>build path /home/ubuntu/myapp/service1 either does not exist, is not accessible, or is not a valid URL.</code></p>
  
  <p>relevant parts of docker-compose-prod.yml:</p>
  
  <pre><code>version: '3'
  
  services:
    service1:
      build:  /home/ubuntu/myapp/service1
  
    service2:
      build:  /home/ubuntu/myapp/service2
  </code></pre>
  
  <p>The path is fine when checking through ssh, it seems like docker-compose is still trying to work on my local machine, it's happy when I provide it with a build path that exists locally. Docker itself executes commands on the remote machine.</p>
  
  <p>How do I get docker-compose to run on the remote docker-machine?</p>
  
  <p>I'm new to this, so hopefully I'm missing something trivial.
  Thanks for the help!</p>