One of the main things you would like to do when you are running Docker containers is communicating with them. Although there are tools like kitematic which provide a GUI interface to use docker, we still somehow stick to the CLI version.
In brief, a container is an encapsulated version of your source code along with its dependencies. Think of it as a box of the good stuff which will run everywhere. The host OS talks to the container which in turn allows you to access it via the host OS.
Start by showing all containers in your system at present -
docker container ls
The leftmost part will show you the Container Ids
Now, what if you want to access it directly. Sure there are CLI commands for that - one such being
docker exec -it <containerId> bash
But how about a GUI client. Well below is a small workaround.
docker inspect <containerId>
This gives you a json as follows
What you will need is the IPAddress part. Just copy that IP address and go to your GUI client and paste it there.
For eg. I was using a mongo container in the above picture. And below is a screen of the robomongo GUI connecting to the container.
I hope it helps!
PS: Use the VSCode's awesome docker extension. Makes life super easy
Happy coding :D
Stay safe everyone