Srisfti
Srisfti

Reputation: 177

How to CLI docker container?

I used Docker Containers with AWS EC2 to run a database and an app. Both containers are up & running.
How to CLI to the app? I wanted to access the web server folders. When I ran locally using Docker Desktop GUI it gives an icon to CLI for each container.

I issued an ifconfig command and converted the inet6 address to ipv4. I tried the ip via putty, it says server is not reachable. Thanks.

Upvotes: 0

Views: 839

Answers (1)

Neo Anderson
Neo Anderson

Reputation: 6372

Connect to your docker instance. Here is the official page to do it. (Here you might want to use SSH).

To connect to the containers, first list them:

docker ps

then open a console in the container you need

docker exec -ti <container-id> sh

Upvotes: 2

Related Questions