docker exec -it command code example
Example 1: docker exec
sudo docker exec --user root -it containerName /bin/bash
Example 2: docker exec -it id command
it ensures that when you exit from contianer it is still running
sudo docker exec --user root -it containerName /bin/bash
it ensures that when you exit from contianer it is still running