Last week, I needed to create a docker image doing a simple thing:
But I’ve a hard part: every 15 minutes, I need to look if a new version of the XML file is available and in case, running the entire process.
Let’s go to see how I did it
I use Python container based on alpine linux as the base, adding an environment variable to avoid PIP cache.
To have multiple processes inside the contianer, I use s6-overlay and I think to rewrite the global path because by default it’s not including the path where Python binaries (pip, python) are installed.
S6-overlay permits to define dependencies between processus and it’s exactly what I need because:
To setup cron, we have few steps inside the Dockerfile:
Steps:
Steps:
Finally, we’ll use s6 has the entrypoint for this container
The repository: xmltv_tnt_json_unit