Monday, August 2, 2021

Enter into the command prompt or shell of a running Docker container from the host command line

If you need to enter into the command prompt of a running Docker container:

sudo docker ps

And then enter the container by name or ID

sudo docker exec -i -t nginx-test /bin/bash

or

sudo docker exec -i -t e7a5s8dd2s3s4-test /bin/sh


No comments:

Post a Comment