Docker Community Forums

Share and learn in the Docker community.

Docker run on Mac with MKNOD support on volume fuse.osxfs

(Chriscarpenter12) #1

Trying to compile some software in docker that relies on MKNOD. It seems to be failing when I mount a local directory on my Mac in the docker container.

I have experimented with --privileged and --cap-add ALL. Neither seem to work.
Full command:

docker run -it --rm --cap-add ALL -v ~/vyos-build:/vyos -w="/vyos" vyos-builder bash

Actual error message when the compile tries to run:

P: Running debootstrap...
mknod: '/vyos/build/chroot/test-dev-null': Function not implemented
E: Cannot install into target '/vyos/build/chroot' mounted with noexec or nodev

Confirmed this looking at mounts:

root@b68ad06f0cad:/vyos# mount | grep vyos
osxfs on /vyos type fuse.osxfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,max_read=1048576)

As a test I spun up a Debian vm in virtualbox and did the exact same docker build and run. Different mount options and the compile actually finishes.

root@826c6e4ea86c:/vyos# mount | grep vyos
/dev/mapper/chris--deb--vg-root on /vyos type ext4 (rw,relatime,errors=remount-ro,data=ordered)

Anyway to get this to work on a Mac with osxfs?

Docker Info:

docker version
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:21:31 2018
 OS/Arch:           darwin/amd64
 Experimental:      false

  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:29:02 2018
  OS/Arch:          linux/amd64
  Experimental:     true

(Chriscarpenter12) #2

This looks like a current issue that’s still open.