title: Docker input/output outside the container
body: <p>I created a docker container with a python script. The python script takes an input file, does some processing and saves output file at some specified location. </p>
  
  <pre><code>docker run /app/script.py --input /data/input.csv --output /data/output.csv
  </code></pre>
  
  <p>Since the input file can be different every time I run the script, I want it to be outside the docker container. I also would like to store the output somewhere outside the container.</p>
  
  <pre><code>docker run /app/script.py --input /my/local/location/outside/docker/input.csv --output /my/local/location/outside/docker/output.csv
  </code></pre>
  
  <p>Does docker support this? If so, how would one be able to achieve it? </p>
  
  <p>My <code>Dockerfile</code> looks like the following:</p>
  
  <pre><code>FROM phusion/baseimage
  
  RUN apt-get update
  RUN apt-get install -y build-essential
  RUN apt-get install -y python-dev
  RUN apt-get install -y python-pip
  RUN apt-get install -y python-numpy &amp;&amp; \
      apt-get install -y python-scipy
  
  COPY ./requirements.txt /app/requirements.txt
  COPY ./src/script.py /app/script.py
  
  WORKDIR /app
  COPY . /app
  </code></pre>