title: Pass parameters to docker container using docker run command
body: <p>I have created a docker image using Dockerfile mentioned below. There is a jar file in the image which needs few parameters to run it. I am passing the parameters using docker run command but it throws me error. Find the details below.</p>
  
  <p>Dockerfile content</p>
  
  <pre><code>FROM ubuntu:14.04
  
  ENV http_proxy http://http.proxy.nxp.com:7000
  ENV https_proxy http://http.proxy.nxp.com:7000
  
  RUN apt-get update
  
  &lt;set of lines for installing java is here&gt;
  
  ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
  
  copy apache-jmeter-3.1 /apache-jmeter-3.1
  RUN mkdir /jarloc
  copy Test.jar /jarloc
  RUN java -version
  ENTRYPOINT [ java -jar /jarloc/Test.jar ]
  RUN ls -l /jarloc
  </code></pre>
  
  <p>I created an image called as jmaster:1.0 and gave following command to spin the container.</p>
  
  <pre><code>docker run jmaster:1.0  http://win_loc/soasta_parent/soasta/MyPOC/Login_Data.csv http://win_loc/soasta_parent/soasta/MyPOC/Dpc_data.csv 30 300 30
  </code></pre>
  
  <p>This gives me following error.</p>
  
  <blockquote>
    <p><a href="http://win_loc/soasta_parent/soasta/MyPOC/Login_Data.csv" rel="nofollow noreferrer">http://win_loc/soasta_parent/soasta/MyPOC/Login_Data.csv</a>: 1: [:
    missing ]</p>
  </blockquote>
  
  <p>I am able to run this script from inside docker (docker run -it jmaster:1.0 /bin/bash). It gives me correct output. But when I try to pass the parameter in docker run command, I am getting this error. Am I passing this in a wrong way or is there any other way to do so?</p>
  
  <p>When I go inside docker using 'docker run -it imagename /bin/bash' and execute following, I am getting correct results from jar.</p>
  
  <pre><code>/jarloc#java -jar Test.jar http://win_loc/soasta_parent/soasta/MyPOC/Login_Data.csv http://win_loc/soasta_parent/soasta/MyPOC/Dpc_data.csv 30 300 30
  </code></pre>