Skip to content

How to log in to bash with docker containers?

Go to the directory where your docker-compose.yml is located and run:

docker exec -it b176ea8b1a1d /bin/bash
docker-compose exec APPNAME /bin/bash
docker attach APPNAME

Get IP Address of Container

docker inspect -f "{{ .NetworkSettings.IPAddress }}" Container_Name
Published inUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *