title: Docker deploy my Strongloop Loopback Node server
body: <p>I'd like to dockerize my Strongloop Loopback based Node server and start using Process Manager(PM) to keep it running.</p>
  
  <p>I've been using RancherOS on AWS which rocks.</p>
  
  <p>I copied (but didn't add anything to) the following Dockerfile as a template for my own Dockerfile:
  <a href="https://hub.docker.com/r/strongloop/strong-pm/~/dockerfile/" rel="nofollow">https://hub.docker.com/r/strongloop/strong-pm/~/dockerfile/</a></p>
  
  <p>I then:</p>
  
  <pre><code>docker build -t somename .
  </code></pre>
  
  <p>(Dockerfile is in .)</p>
  
  <p>It now appears in:</p>
  
  <pre><code>docker images
  </code></pre>
  
  <p>But when I try to start it, exits right away:</p>
  
  <pre><code>docker run --detach --restart=no --publish 8701:8701 --publish 3001:3001 --publish 3002:3002 --publish 3003:3003 somename
  </code></pre>
  
  <p>AND if I run the strong-pm image and after opening ports on AWS, it works as above with strongloop/strong-pm not somename</p>
  
  <p>(I can browse aws-instance:8701/explorer)</p>
  
  <p>Also, these instructions to deploy my app <a href="https://strongloop.com/strongblog/run-create-node-js-process-manager-docker-images/" rel="nofollow">https://strongloop.com/strongblog/run-create-node-js-process-manager-docker-images/</a> require:</p>
  
  <pre><code>slc deploy http://docker-host:8701/
  </code></pre>
  
  <p>but Rancher doesn't come with npm (or curl) installed and when I bash into the vm, slc isn't installed, so seems like slc needs to be "outside" the vm</p>
  
  <pre><code>docker exec -it fb94ddab6baa bash  
  </code></pre>
  
  <p>If you're still reading, nice.  I think I'm trying to add a Dockerfile to my git repo that will deploy my app server (including pulling code from repos) on any docker box.  </p>