How to scale docker containers with arguments

8/26/2020

i wrote a python script that just grabs stock data and takes a symbol as an argument in the CLI and can dockerize just fine, however how can i scale this to 100 or more containers that build and then run at the same time, each having unique arguments? Heres some psuedo-code that shows what im trying to accomplish:

For symbol in df_NYSE.iterrows():
    build image with unique name..ie grab-stock-price-AMD (if argument passed is "--symbol AMD")
    store each image name in a list
    start each image in the list with the symbol variable in this for loop

Is this a task for kubernetes?

-- 2JZIgnition
docker
kubernetes
python
scale

0 Answers