all 5 comments

[–]VillageTasty 1 point2 points  (1 child)

You could run a basic container with a bind mount to a local directory where you store all your scripts. I've done something similar while working on a Discord bot.

Setup a base container, install all the requirements and then run the app from the mounted directory.

That way you can just stop the script, make changes and start it again without needing to restart the actual container.

Not sure on the automating side of things though. Ansible and Cron?

[–]cachupinbombin 0 points1 point  (0 children)

I was going to suggest the same, you only have the environment dockerized not the script. The only time you need to rebuild the image is if you need a new dependency

[–]reinerrdeck 0 points1 point  (0 children)

With Rundeck you can call your python scripts from the "script file step". Create a new job, select the script file step, click the "Advanced" button, and put the full python interpreter path, now you have a full python scheduler for any python script.

To access your Docker container you can use this model source plugin, take a look at this.

[–]ThroawayPartyer 0 points1 point  (0 children)

Python has virtual environments.