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;"
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34f6f-2bf64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34f6f-2bf64.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?