Multiple commands

This is the that I use to currently execute my code

letters=( "a" "b" "c" "d" )
for i in "${letters[@]}"
    python $i &

This passes the letter into my which I can then use.

How do I rewrite this in docker, considering I can only use on CMD command?

I think I should use docker-compose for this but I don’t know how

You could use the COPY instruction in your Dockerfie to copy into the image and use the ENTRYPOINT instruction (make sure to use the exec form!) to call it as entrypoint script.

1 Like