nrpa3w
Last Updated: September 11, 2016
·
5.381K
· vedanta

Execute bash inside a docker container the right way

#!/bin/bash
#connect to a container
echo "Connect to container instance : $1" docker exec -it $1 /bin/bash -c "export TERM=xterm; exec bash"