ssh into container docker code example
Example 1: ssh into docker container
docker exec -it <container name> /bin/bash
Example 2: how to connect to docker via ssh
sudo docker exec –it nginx-test /bin/bash
Example 3: ssh into docker container
docker exec --user root -it <container name> /bin/bash
docker exec <container name> bash -c printenv