title: Docker run override entrypoint with shell script which accepts arguments
body: <p>I have entrypoint shell script which accepts arguments <strong>-a -b</strong>.</p>
  
  <p>I have working <strong>docker-compose.yml</strong> file where I override tomcat's entrypoint with instruction: </p>
  
  <pre><code>entrypoint: /usr/local/tomcat/entrypoint.sh -a param1 -b param2
  </code></pre>
  
  <p>What is <strong>docker run</strong> alternative?</p>
  
  <pre><code>docker run --entrypoint "/usr/local/tomcat/entrypoint.sh -a param1 -b param2" tomcat:jre8
  </code></pre>
  
  <p>does not work</p>
  
  <p>I get:</p>
  
  <pre><code>docker: Error response from daemon: 
  invalid header field value "oci runtime error: container_linux.go:247: 
  starting container process caused \"exec:
  \\\"/usr/local/tomcat/entrypoint.sh -a param1 -b param2\\\": 
  stat /usr/local/tomcat/entrypoint.sh -a param1 -b param2: 
  no such file or directory\"\n".
  </code></pre>
  
  <p>FYI:</p>
  
  <pre><code>docker run --entrypoint "/usr/local/tomcat/entrypoint.sh" tomcat:jre8
  </code></pre>
  
  <p>works from Docker point of view, but obviously script fails</p>