title: Execute command on docker container from remote machine
body: <p>I have docker running on Host. There are two docker containers on this host i.e container_1 and container_2. Now I want to execute some commands on container_1 from my remote dev machine. </p>
  
  <p>pipe separated commands i.e, </p>
  
  <pre><code>sudo docker exec -it  container_1 sudo find &lt;dir&gt; - type f -iname *_abc_* -print0 | du --files0-from - -b | awk 'BEGIN{sum=0} {sum+=$1} END{print sum}'
  </code></pre>
  
  <p>Form above command only first command till first pipe execute on docker container and next set of command execute on host.</p>
  
  <p>I am using python fabric api to execute this from remote machine.</p>
  
  <p>Is there any way to execute this full command on container from remote machine ? </p>