How can I run multiple commands in docker at once?
I tried to execute using && symbol but I’m getting error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In order to run multiple commands in docker, use /bin/bash -c with a semicolon ;
/bin/bash -c "cd /some/path; python a.py"
In the above given commands, the second command will be executed only if the first command (cd) doesn’t return error or an exit status. For this we can use && instead of ; (semi-colon)