connect to a docker container code example
Example 1: docker access container
docker exec -it <mycontainer> bash
docker exec -it <mycontainer> sh ##for alpine
Example 2: docekr enter container
docker exec -it [container-id] bash
Example 3: docker start container
$ docker start my_container
Example 4: how to connect to docker via ssh
sudo docker exec –it nginx-test /bin/bash
Example 5: docker ssh
sudo docker attach Container_Name
Example 6: start a docker container
$ docker start <container_id>