Wednesday, November 21, 2018

Attaching a Shell to a Container

We can attach a shell to containers and browse them just like they were a full operating system

The -i and -t flags can be passed to theexec command to keep an interactive shell open, and you can specify the shell you want to attach after the container ID. Here we'll attach a standard Bash shell.

docker container exec -it my_container_i88 /bin/bash