On Hyper-V, mount the /port filesystem

This allows localhost port forwards to be requested if

  native/port-forwarding=true

if set.

Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
David Scott 2016-05-22 18:42:28 +01:00
parent 6288e9826c
commit b921ae7c36

View File

@ -10,8 +10,12 @@ start()
ebegin "Setting up proxy port service"
mkdir -p /port
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /port
if [ -d /sys/bus/vmbus ]; then
# Running on a Hyper-V hypervisor
/sbin/9pmount-vsock --serviceid 0B95756A-9985-48AD-9470-78E060895BE7 listen port /port
else
mount -t 9p -o trans=virtio,dfltuid=1001,dfltgid=50,version=9p2000 port /port
fi
[ -n "${PIDFILE}" ] || PIDFILE=/var/run/proxy-vsockd.pid
[ -n "${LOGFILE}" ] || LOGFILE=/var/log/proxy-vsockd.log