I have seen a few answers about this but noone do what I would like to do, as far as I can understand. Example
If my code is able to accept different calls like this:
app.py -hist
app.py -hist -yearIni 2018 -yearEnd 2019 -station 12341234
app.py -hist -dateIni 20-2-2018 -dateEnd 20-2-2019
And depending on what arguments it receives, it makes an API call or another.
What I want now is to dockerize this behaviour. So far I have only found Docker ARG and CMD as options, but if I understand them correctly, they do not allow to pass a file, like a yaml, specifying which arguments will appear. Instead, you are forced to somehow hard code in either Dockerfile or somewhere else the names and (possible) values of the arguments.
Since right now I have already 4-5 different combinations, and they may grow in the future, I would like to pass a file.yaml (or json or whatever other format) where I define what possible parameters can be used, and then my python code will decide whether or not those are valid parameters, and act based on that.
Pseudocode of possible yaml "schema":
predictions:
city: "//str"
hist:
yearIni: "//str"
yearEnd: "//str"
dateIni: "//str"
dateEnd: "//str"
station: "//str"
Is there any way to do this? To pass dynamic arguments to a python app that could work on its own with this behaviour, but now, inside docker?