title: `docker run` on a remote host
body: <p>is it possible (using the <code>docker</code> command or the <code>docker-py</code> API directly) to start a container from a remote host?</p>
  
  <p>Lets assume I have two machines that have different architectures:
  - A is an <code>x86</code> machine
  - B is an <code>ARM</code> machine</p>
  
  <p>I would like to run a container on the B machine using my A machine. At first, I thought it was possible using this command:</p>
  
  <pre><code>[A]$&gt; DOCKER_HOST=$MACHINE_B_IP:$MACHIN_B_PORT docker run hello-from-B
  </code></pre>
  
  <p>But this command actually pulls the image <code>hello-from-B</code> and tries to run it on the machine A which ends up on some <code>exec format error</code> cause obviously you can't run images that are specific to <code>ARM</code> to an <code>x86</code> machine.</p>
  
  <p>Communication between machine A and B is working well. I can run commands like <code>images</code> or <code>ps</code> and it gives me the expected results:</p>
  
  <pre><code>[A]$&gt; DOCKER_HOST=$MACHINE_B_IP:$MACHIN_B_PORT docker images
  REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
  hello-from-B              &lt;none&gt;              fd5059044831        13 hours ago        1.26GB
  </code></pre>
  
  <p>I've heard about <code>docker-machine</code> and haven't tried it yet, but from my understanding, this won't solve my problem.</p>
  
  <p>Is there any way to achieve that using <code>docker</code> directly. A workaround might be to using <code>ssh</code> to connect to the remote host and use the <code>docker</code> client directly from the remote host, but I'd like to avoid this solution as much as possible.</p>
  
  <p>Thanks in advance,</p>
  
  <hr>
  
  <p>TL;DR;</p>
  
  <p>How can <code>DOCKER_HOST=... docker run something</code> runs <code>something</code> on the <code>DOCKER_HOST</code> rather than running it on my local machine.</p>