Is it possible to copy a file, let’s say a python script, and execute it every X amount of time?
Alex Ramirez
1

Yes, there are a couple of options

  • Using docker volumes(this is not actually copying a file): docker run -v myscript.py:/myscript.py alpine echo \"* * * * * python /myscript.py\" | ...
  • Compile it as a Docker image and use COPY myscript.py

It would depend on the contents of the script, but it would be cleaner to compile since you might need other dependencies.