mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-25 06:54:07 +00:00
The proxy process command-line arguments assume we're exposing TCP or UDP ports on Moby's public IPs. Instead we're forwarding over vsock where we must map the Moby ports onto vsock ports. Normally TCP and UDP ports are different, but with vsock there is only one space of port numbers so we have to map them into different ranges. This patch maps Moby ports as follows: - TCP port x onto vsock port 0x10000 + x - UDP port x onto vsock port 0x20000 + x Signed-off-by: David Scott <dave.scott@docker.com>
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