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
It would depend on the contents of the script, but it would be cleaner to compile since you might need other dependencies.