Docker Community Forums

Share and learn in the Docker community.

Autofs in docker for mac


(Rostchri) #1

I wonder if it is possible to use automounter/autofs for nfs-purposes in a docker-container on docker for mac.
Mounting NFS-shares is working well, but autofs itself does not work for me.

I tried the stuff from https://whyistheinternetbroken.wordpress.com/2015/05/12/techusing-nfs-with-docker-where-does-it-fit-in/ but at the end it fails with the error:

Sep 18 13:37:00 6ab5838b7cea systemd[1]: Starting Automounts filesystems on demand…
Sep 18 13:37:00 6ab5838b7cea automount[286]: /usr/sbin/automount: test mount forbidden or incorrect kernel protocol version, kernel protocol version 5.00 or above required.

The docker-container is started in --privileged mode.

In https://scriptthe.net/2015/02/05/autofs-in-docker-containers/ it is mentioned that “modprobe autofs4” needs to run at the host first. Is this possible on docker for mac? Does anybody have a working docker-container with autofs on docker for mac?