Skip to content

Commit 222b2b3

Browse files
authored
Merge pull request #171 from dalehamel/fix-docker-9p-uid
Don't hardcode the docker user id
2 parents dcacfe3 + a8d4212 commit 222b2b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xhyve/xhyve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ func (d *Driver) setupVirt9pShare() error {
956956
bootScriptName := "/var/lib/boot2docker/bootlocal.sh"
957957
bootScript := fmt.Sprintf("#/bin/bash\\n"+
958958
"sudo mkdir -p %s\\n"+
959-
"sudo mount -t 9p -o version=9p2000 -o trans=virtio -o uname=%s -o dfltuid=1000 -o dfltgid=50 -o access=any host %s", d.Virtio9pFolder, user.Username, d.Virtio9pFolder)
959+
"sudo mount -t 9p -o version=9p2000 -o trans=virtio -o uname=%s -o dfltuid=$(id -u docker) -o dfltgid=50 -o access=any host %s", d.Virtio9pFolder, user.Username, d.Virtio9pFolder)
960960

961961
writeScriptCmd := fmt.Sprintf("echo -e \"%s\" | sudo tee %s && sudo chmod +x %s && %s",
962962
bootScript, bootScriptName, bootScriptName, bootScriptName)

0 commit comments

Comments
 (0)