Docker version 20.10.14
Ubuntu 22.04
File system: software raid on btrfs
Goal: I want to bind the host machine directory of /srv/DOCKER/JellyFin/config
Issue: For some wild reason I can’t seem to --mount bind a directory that’s off of /srv, but I can if it’s off /media/user1. Hosing folder user and group permissions are set to guid and uuid both equal 1000. Verified my group and user ID are boot 1000 too just in case. Tried both btrfs and ext4. No difference.
Here’s the command:
user1@NAS:/$ sudo docker run -t -d -P --mount type=bind,source=/srv/DOCKER/JellyFin/config,target=/config --name JFtest linuxserver/jellyfin
docker: Error response from daemon: invalid mount config for type “bind”: bind source path does not exist: /srv/DOCKER/JellyFin/config.
The source does exist 100%. I’ve seen some forums talk about ‘sharing’ settings but seems only dealing with MACs?
My first suggestion would be this: (blurred after noticing the error message)
Make sure to not(!) use the docker package from Snap or the docker.io package from Ubuntu’s repo. Make sure to use the docker-ce packages from Docker’s repo.
You can check it running this command for snap: snap list docker and this command for ubuntu’s version: dpkg --list | grep docker
But after a second look at the post, the error message indicates the issue clearly:
Also just to add what version of docker - I’m using ubuntu’s 22.04 default. Here’s the output:
user1@NAS:~$ dpkg --list | grep docker
ii docker 1.5-2 all transitional package
ii wmdocker 1.5-2 amd64 System tray for KDE3/GNOME2 docklet applications
How I discovered it:
At first, I just removed docker (I thought) and installed from here. Install Docker Engine on Ubuntu | Docker Docs This didnt fix it but gave me an oddity which led me to the solution.
At first I was excited. I could then --mount bind to /srv! So tried the next directory. “/srv/DOCKER” but it gave me the doesn’t exist error again. So next was just toe delete the container and something new happened. It would give me “cannot stop container: 426ddb746d4f: permission denied” Digging into that error led me to the solution. @ stackoverflow (google ->docker-containers-can-not-be-stopped-or-removed-permission-denied-error"
So that led me to the SNAP issue with AppArmor. Had to issue this: sudo aa-remove-unknown which removes unknown. It removed it and I could then stop the docker container. I then looked at all the SNAP stuff. Guess what was there? Docker and WMDocker. Removed those, removed all docker anything, reinstalled it. Good as gold.
In my first response, there is a blured text that includes the command that would have detected the snap docker package. Honestly, whenever things happen that don’t make sense, the first thing that commes to mind is the “docker” snap package. Then I saw the error message and wrapped my initial thought in a blurred block, and it was just a huch without evidence.
Your description was very helpful, even I never had anything installed with snap.
The issue was that docker desktop was installed and I clicked inside this on the update button, which seems having messed up some things.
Having gotten the same error with bind then, and reinstalling everything worked well in the end.