Files
linuxkit/alpine/packages/proxy
David Scott d7b4675962 proxy: don't fail if the Listen in the VM fails with EADDRNOTAVAIL
The purpose of the `slirp-proxy` is to expose ports on the Mac or
Windows host. In d5bd7d690a we added
an additional `Listen` inside the VM for backwards compatibility
with software that expected to be able to listen on `0.0.0.0` in
one container and then access this easily from other containers
using an IP bound to the VM (instead of using a first-class network
to connect the containers or discovering a real IP of the host).

Before this patch we could only expose ports on if the Listen
succeeds on both the host and the VM. In practice this meant that
we could only expose ports on `0.0.0.0` and `127.0.0.1`; attempts
to expose ports on specific interfaces on the host would fail.

This patch treats the EADDRNOTAVAIL error from the Listen inside
the VM as a soft failure, and still attempts to Listen on the host.
If the Listen on the host fails it is still a hard failure.
This allows ports to be exposed on specific IPs used on the host.

Fixes [docker/pinata#5080]

Signed-off-by: David Scott <dave.scott@docker.com>
2016-09-08 13:32:25 +01:00
..
2016-09-06 13:18:11 +01:00
2016-07-12 10:26:42 +01:00
2016-04-04 12:41:02 +01:00

docker-proxy which can set up tunnels into the VM

This is a replacement for the built-in docker-proxy command, which proxies data from external ports to internal container ports.

This program uses the 9P filesystem under /port to extend the port forward from the host running the Moby VM all the way to the container.

docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.17.0.2 -container-port 8080