Saturday 9 May 2020

Docker: Open bash shell of docker container

Just add the command /bin/bash while running the container.

Step 1: Open terminal and execute below command
docker run -t -i ubuntu /bin/bash

$docker run -t -i ubuntu /bin/bash
root@b63f436f0087:/# echo "Hello World"
Hello World
root@b63f436f0087:/#

Execute the command ‘exit’ to comeout of bash shell.

root@b63f436f0087:/# exit
exit
$



Previous                                                    Next                                                    Home

No comments:

Post a Comment