TLDR;
I’m merely looking to rule out some context of Docker that may be causing this (I’m super new with Docker). Then I can continue my investigation elsewhere without attempting to drag this community in beyond the Docker scope.
- The app cannot see data on
--volume
that is an SMB share mounted via fstab.
Summary
Hi there, curious about something. I have an SMB volume mounted via fstab (host). I then pass that mounted folder through to my container into the containers /mnt
directory. But for some reason, the application (Emby in this case) cannot access the data. Is there something I’m missing that might restrict this? I passed in the users UID with ENV
. I thought that might do it…
Same app and permissions work on a local mapped directory though; mapped meaning into the container.
Container Run CMD
sudo docker run --name emby-server -d --volume /home/media/docker/emby:/config --volume /SMB/media:/mnt/media --volume /home/media/out:/mnt/out --device /dev/dri/renderD128 --publish 8096:8096 --publish 8920:8920 --env UID=112 --env GID=119 --env GIDLIST=44,122,124 emby/embyserver:latest
When having data on the -volume /home/media/out:/mnt/out
portion, the app works fine, but the --volume /SMB/media:/mnt/media
fails (from an application context - I can access the data file when I am in the container).
ATTEMPTED
-
Made sure the UID matches with the NAS user (host fstab mount) and app user and passed in the UID ENV to the container as well.
-
Double checked the permissions from the host and within the container to ensure the UID/GID are proper.
System Details
HOST
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
DOCKER
docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.4
Git commit: e68fc7a
Built: Fri Jan 25 14:33:54 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.4
Git commit: e68fc7a
Built: Thu Jan 24 10:56:33 2019
OS/Arch: linux/amd64
Experimental: false
FSTAB
//172.30.1.1/media /SMB/media cifs credentials=/home/media/.smbcreds,iocharset=utf8,sec=ntlm 0 0
HOW TO REPRODUCE
# - Drive mounted as per fstab (above)
# - UID of the mounting user matches the UID/GID passed to the container
$ docker pull emby/embyserver:latest
$ docker run --name emby-server -d --volume /home/media/docker/emby:/config --volume /SMB/media:/mnt/media --volume /home/media/out:/mnt/out --device /dev/dri/renderD128 --publish 8096:8096 --publish 8920:8920 --env UID=112 --env GID=119 --env GIDLIST=44,122,124 emby/embyserver:latest
# - Config emby library to have access to those folders - off scope here - don't want to waste people's time
# - Scan library in Emby
# - Watch for media that exists on the SMB (/SMB/media:/mnt/media) drive - never shows.
# - Watch for media that exists on the local drive (/home/media/out:/mnt/out) - appears.
Thank you in advance for your time.