title: Docker not saving images and writing to textfile (Python application)
body: <p>I created a Python application that receives images from an email message and stores it locally under a folder called <strong>Images</strong>. It also writes some config data to <strong>dict.txt</strong>. When I run the application without Docker (using Pycharm IDE), this works. However, this expected behaviour does not occur when I use docker.</p>
  <p><a href="https://i.stack.imgur.com/Qnm5H.png" rel="nofollow noreferrer">ImageLink: Directory structure (Pycharm IDE)</a></p>
  <p><strong>Directory structure (container):</strong></p>
  <pre><code>IntermediateService
  ├─── Dockerfile
  ├─── requirements.txt
  └─── src
       └─── emailAccountA.py
       └─── emailAccountB.py
       └─── main.py
       └─── dict.txt
       └─── Images
  </code></pre>
  <p><strong>Dockerfile:</strong></p>
  <pre><code># set base image (host OS)
  FROM python:3.8.5
  
  # set the working directory in the container
  WORKDIR /code
  
  # copy the dependencies file to the working directory
  COPY requirements.txt .
  
  # install dependencies
  RUN pip --default-timeout=100000 install -r requirements.txt
  
  # copy the content of the local src directory to the working directory
  COPY src/ .
  
  # command to run on container start
  CMD [ &quot;python&quot;, &quot;./main.py&quot; ]
  </code></pre>
  <p><strong>I run the following docker commands:</strong></p>
  <pre><code>docker build -t intermediateservice .
  docker run intermediateservice
  </code></pre>
  <p>The container builds and runs without any issue, just does not write to <strong>dict.txt</strong> and save the downloaded images to the <strong>Images folder</strong> (both textfile and folder are always empty). What needs to be done to resolve this issue?</p>