Determining your Windows Containers IP Address When Using Docker

Figuring out what IP address your containers are using isn’t very clear at first but with the following two commands you can easily gain access to this information.

Pre-Reqs:

  1. Docker and Kitematc are installed on your Windows machine.
  2. You have added a Container and it is currently RUNNING; I used mssql-server-2016-express.

Open up Command Prompt and type:

docker network ls

docker network ls

Look for the NETWORK ID of the container with nat under the DRIVER column. Type in the following next:

docker network inspect <first 3 digits of the NETWORK ID from above>

docker network inspect

This will print out a list of Containers. Find your container and then look at the IPv4Address. With this information and the port entered under your containers settings you can connect to your container.

Leave a Reply

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