Update networking.md

This commit is contained in:
paigehargrave 2019-01-11 15:43:15 -05:00 committed by GitHub
parent c2cef4bc02
commit d46c744304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -3,19 +3,19 @@ description: Networking
keywords: mac, networking keywords: mac, networking
redirect_from: redirect_from:
- /mackit/networking/ - /mackit/networking/
title: Networking features in Docker for Mac title: Networking features in Docker Desktop for Mac
--- ---
{% assign Arch = 'Mac' %} {% assign Arch = 'Mac' %}
Docker for {{Arch}} provides several networking features to make it Docker Desktop for {{Arch}} provides several networking features to make it
easier to use. easier to use.
## Features ## Features
### VPN Passthrough ### VPN Passthrough
Docker for {{Arch}}'s networking can work when attached to a VPN. To do this, Docker Desktop for {{Arch}}'s networking can work when attached to a VPN. To do this,
Docker for {{Arch}} intercepts traffic from the containers and injects it into Docker Desktop for {{Arch}} intercepts traffic from the containers and injects it into
{{Arch}} as if it originated from the Docker application. {{Arch}} as if it originated from the Docker application.
### Port Mapping ### Port Mapping
@ -26,7 +26,7 @@ When you run a container with the `-p` argument, for example:
$ docker run -p 80:80 -d nginx $ docker run -p 80:80 -d nginx
``` ```
Docker for {{Arch}} makes whatever is running on port 80 in the container (in Docker Desktop for {{Arch}} makes whatever is running on port 80 in the container (in
this case, `nginx`) available on port 80 of `localhost`. In this example, the this case, `nginx`) available on port 80 of `localhost`. In this example, the
host and container ports are the same. What if you need to specify a different host and container ports are the same. What if you need to specify a different
host port? If, for example, you already have something running on port 80 of host port? If, for example, you already have something running on port 80 of
@ -45,18 +45,18 @@ See [Proxies](index#proxies).
## Known limitations, use cases, and workarounds ## Known limitations, use cases, and workarounds
Following is a summary of current limitations on the Docker for {{Arch}} Following is a summary of current limitations on the Docker Desktop for {{Arch}}
networking stack, along with some ideas for workarounds. networking stack, along with some ideas for workarounds.
### There is no docker0 bridge on macOS ### There is no docker0 bridge on macOS
Because of the way networking is implemented in Docker for Mac, you cannot see a Because of the way networking is implemented in Docker Desktop for Mac, you cannot see a
`docker0` interface on the host. This interface is actually within the virtual `docker0` interface on the host. This interface is actually within the virtual
machine. machine.
### I cannot ping my containers ### I cannot ping my containers
Docker for Mac can't route traffic to containers. Docker Desktop for Mac can't route traffic to containers.
### Per-container IP addressing is not possible ### Per-container IP addressing is not possible
@ -72,7 +72,7 @@ The host has a changing IP address (or none if you have no network access). From
18.03 onwards our recommendation is to connect to the special DNS name 18.03 onwards our recommendation is to connect to the special DNS name
`host.docker.internal`, which resolves to the internal IP address used by the `host.docker.internal`, which resolves to the internal IP address used by the
host. host.
This is for development purpose and will not work in a production environment outside of Docker for Mac. This is for development purpose and will not work in a production environment outside of Docker Desktop for Mac.
The gateway is also reachable as `gateway.docker.internal`. The gateway is also reachable as `gateway.docker.internal`.