title: docker - execute a file from code that gets updated
body: <p>I have an application in which the user submits the code which the docker then executes. Currently, I have an image that executes python code. My dockerfle is as follows:</p>
  
  <pre><code>FROM python:latest
  
  WORKDIR /app
  
  COPY /repository/test.py /app
  
  CMD ["python", "test.py"]
  </code></pre>
  
  <p>It executes the code fine but the problem comes after that: If a user updates his code and the command is again run to execute the updated file the image does not run the updated file. It runs the old one. I'm assuming that's because when the image gets created from the dockerfile the file is copied for the first and the last time and this file will be executed again and again everytime its container is called. </p>
  
  <p>How I can tackle this issue? Basically, I want to execute code from the docker that will be updated continuously and I need docker to cater for that.</p>