title: Docker image and ENV command for PYTHONPATH: module not found even when locally runs fine
body: <p>I've got a Python job that I'm trying to ship in a Docker image. The code is structured in such a way that some modules get imported from a <code>modules</code> folder, so I've added to the Python path. </p>
  
  <p>Specifically, the Dockerfile is </p>
  
  <pre><code>FROM python:3
  
  RUN mkdir -p /usr/src/app
  WORKDIR /usr/src/app
  COPY . /usr/src/app
  
  ENV PYTHONPATH "/usr/src/app"
  
  RUN pip3 install -r requirements.txt
  </code></pre>
  
  <p>As you can see, I'm trying to set the environment variable for PYTHONPATH so it would find stuff in the same working directory. </p>
  
  <p>The script to run is called <code>main.py</code> and when I run it locally (not from docker) as </p>
  
  <pre><code>PYTHONPATH=$PYTHONPATH:$HOME/job-path python3 main.py
  </code></pre>
  
  <p>it runs fine. </p>
  
  <p>With that Dockerfile instesd, after building the image I get, from a <code>docker inspect &lt;ID&gt;</code>, that the Env field contains</p>
  
  <pre><code>"Env": [
              "PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
              "LANG=C.UTF-8",
              "PYTHON_VERSION=3.6.4",
              "PYTHON_PIP_VERSION=9.0.1",
              "PYTHONPATH=/usr/src/app"
          ]
  </code></pre>
  
  <p>so it'd look like it's fine? But <code>docker run</code> gives me a </p>
  
  <pre><code>ModuleNotFoundError: No module named 'modules'
  </code></pre>