title: Why doesn't a command that works inside a docker container work from outside via docker run?
body: <p>I have a container called <code>my_container</code> when I run <code>docker run -i -t my_container</code> I can then run <code>npm --version</code> and I get <code>2.7.4</code>.</p>
  
  <p>However when I try to run the same command from outside the container using <code>docker run --workdir=/home/ubuntu/www my_container npm --version</code> I get an error message:</p>
  
  <blockquote>
    <p>Unable to locate npm.
    lxc-start: The container failed to start.
    lxcstart: Additional information can be obtained by setting the --logfile and --logpriority options.</p>
  </blockquote>
  
  <p>Most commands I run have this same behavior not just <code>npm</code>. I am doing this in Circle CI if that adds any more clues.</p>