my goal is to execute the shell script in the container to start some services when starting the container, but after executing
docker run -it --privileged=true newtest /bin/bash -c "sh ./init.sh"
After the command, the container is the state of the Exited.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f14863acb5d7 newtest "/bin/bash -c init.sh" Less than a second ago Exited (127) 4 seconds ago serene_wing