Docker Community Forums

Share and learn in the Docker community.

Docker image: 1and1internet/ubuntu-16-healthcheck - nfs mount permission denied

Hello,

Due to an application requirement, we need to deploy a Ubuntu 16 docker image.
Having pulled the docker image 1and1internet/ubuntu-16-healthcheck , and started
a container, I have come across a problem in trying to do a NFS mount a storage from
another Linux host. Basically I am getting permission denied.

The same mount however works on the docker host.
I did try reinstall nfs-common inside the container, but no joy.

Can anyone shed some lights on this?

Below described the steps involved.

many thanks.

Regards,
Peter

  1. On the native host, nfs mount works fine:

[root@proc01 ~]# df -h /disks/lofarfs1
Filesystem Size Used Avail Use% Mounted on
lofarfs:/disks/lofarfs1 61T 16T 45T 27% /misc/lofarfs1

[root@proc01 ~]# [root@proc01 ~]# ls /disks/lofarfs1
gwhite pcmc

  1. Enter into the container:

[root@proc01 ~]# docker exec -it a462e266ddcb bash
root@a462e266ddcb:/# ls /mnt/
root@a462e266ddcb:/# mkdir /mnt/test
root@a462e266ddcb:/# mount lofarfs:/disks/lofarfs1 /mnt/test
mount: permission denied
root@a462e266ddcb:/# exit

  1. Docker version

[root@proc01 ~]# docker version
Client:
Version: 18.09.3
API version: 1.39
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 06:33:21 2019
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.3
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 06:02:24 2019
OS/Arch: linux/amd64
Experimental: false
[root@proc01 ~]#