From d9fdc040320d4991598a5dbca303dc8bf9480fa3 Mon Sep 17 00:00:00 2001 From: Michael Friis Date: Mon, 3 Oct 2016 13:03:45 -0700 Subject: [PATCH] simplify getting IP address --- docs/framework/docker/aspnetmvc.md | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/docs/framework/docker/aspnetmvc.md b/docs/framework/docker/aspnetmvc.md index 823214f648c69..c26f268b44119 100644 --- a/docs/framework/docker/aspnetmvc.md +++ b/docs/framework/docker/aspnetmvc.md @@ -186,26 +186,11 @@ The `mvcrandomanswers` is the name of the image to start. > the IP address of the container. Once the container starts, you'll need to find its IP address so that you -can connect to your running container from a browser. You use the `docker exec` -command to do that: +can connect to your running container from a browser: ``` -docker exec randomanswers ipconfig -``` - -You will see an output similar to this: - -``` -Windows IP Configuration - - -Ethernet adapter Ethernet 2: - - Connection-specific DNS Suffix . : - Link-local IPv6 Address . . . . . : fe80::91d:ce97:dd27:460d%5 - IPv4 Address. . . . . . . . . . . : 172.31.194.61 - Subnet Mask . . . . . . . . . . . : 255.240.0.0 - Default Gateway . . . . . . . . . : 172.16.0.1 +docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress }}" randomanswers +172.31.194.61 ``` You can connect to the running container using the IPv4