The cmd parameter of docker executes two commands at a time

encountered this problem when using docker:
my php project uses composer to install extensions. I want to update every time I run docker, and also run php start.php
. This results in two commands composer update and php start.php in the cmd of the docker container, but if I execute composer update;php start.php in the actual docekr container, I put update; in the actual docekr container. It is the same for php as a parameter to parse & & as the delimiter, as follows


Do not run Composer as root/super user! See https://getcomposer.org/root for details

  [Symfony\Component\Console\Exception\CommandNotFoundException]  

  Command "update&&" is not defined.                              
                                                      
  Did you mean this?                                             
      update                                                      

what should I do? I thank you for creating a batch file. I already know this

.
Mar.01,2021

I don't know how you started docker and how you executed the command.

Let's take the command line to start docker as an example, and execute multiple commands sequentially

docker run ... /bin/bash -c "composer update; php start.php;"
Menu