I am new to docker
, I am looking for a way to execute a command in docker container depends on the environment.
In Dockerfile, I have 2 commands, command_a and command_b. If the env = 'prod'
run command_a, else command_b. How can I achieve this?
I tried like below:
RUN if [ $env = "prod" ] ; then echo command_a; else echo cpmmand_b; fi;
How can I achieve the desired behaviour?
PS: I know that echo should not be there.