Answers for "execute docker shell"

0

how to execute docker command in shell script

echo -n "enter type compose command ? "
read type

[[ "$type" ]] && docker-compose $type;
Posted by: Guest on February-07-2021
0

execute docker shell

Follow these steps:

    Use docker ps to get the name of the existing container.
    Use the command docker exec -it <container name> /bin/bash to get a bash shell in the container.
    Or directly use docker exec -it <container name> <command> to execute whatever command you specify in the container.
Posted by: Guest on September-15-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language