title: Using docker-machine, how can I build a local Dockerfile on an ec2 instance without using swarm or compose?
body: <p>On my local machine, I've created an ec2 instance using docker-machine, using the following two commands:</p>
  
  <pre><code>$ docker-machine create \
         --driver amazonec2 \
         --amazonec2-open-port 8000 \
         --amazonec2-iam-instance-profile iam-user \
         default
  </code></pre>
  
  <p><code>$ eval "$(docker-machine env default)"</code></p>
  
  <p>At this point, I'm stuck. I've navigated to a local directory where my <code>Dockerfile</code> is and tried running <code>docker build .</code> but that image gets built on my local machine. I've read the documentation, and there doesn't seem to exist anything like <code>docker-machine build</code>.</p>
  
  <p>Am I not understanding docker-machine conceptually? Should I copy over my project code to the ec2 instance and try it that way? If so, wouldn't something like that be against the point of using docker-machine in the first place?</p>