Bind source path does not exist: <- But it does exist

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?

I’m open to any brainstormed ideas!

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:

What does stat /srv/DOCKER/JellyFin/config show?

Thanks meyay for any help! Here’s what the stat info comes back with:

user1@NAS:~$ stat /srv/DOCKER/JellyFin/config
File: /srv/DOCKER/JellyFin/config
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 1ch/28d Inode: 350810 Links: 1
Access: (0775/drwxrwxr-x) Uid: ( 1000/ krysus) Gid: ( 1000/ krysus)
Access: 2022-05-04 19:39:46.136624753 -0400
Modify: 2022-05-03 19:26:50.087597375 -0400
Change: 2022-05-03 19:26:50.087597375 -0400
Birth: 2022-05-03 16:47:22.155396139 -0400

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

Your command works just fine with a vanila docker-ce 20.10.14 installation - neither the syntax nor the sozrce path are an issue.

Since the output of stat looks fine I don’t see a reason why it’ not working. You might want to retry with vanila docker from docker’s repos.

Can you tell me how you installed docker, if not from ubuntu default?

No problem, I googled “docker install ubuntu” for your.

The first hit is what you want to follow: Install Docker Engine on Ubuntu | Docker Documentation

Discovered what it was. Something dealing with installing Docker from ‘store’ causing it to be the SNAP docker version.

Simple fix steps for me:

  • remove all docker:
    sudo apt remove docker*
  • remove all snap docker:
    sudo snap remove docker (I removed wmdocker also)
  • sudo apt autoremove (it kept asking me to do it so once I did, I could reinstall docker below)
  • reinstall docker form instructions (again): Install Docker Engine on Ubuntu | Docker Docs
  • Success!!!

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.

Hope this helps someone!

1 Like

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.

I am glad it is fixed now.

@meyay Thanks again, having someone tell me the commands weren’t wrong and another pair of eyes helped tons.

@meyay if there is a ‘buy a beer’ link on this site, let me know I’d happily send you $ for one. Take care.

Welcome! just spread the word about your experience with the docker snap package with the rest of the world and I am happy :slight_smile:

2 Likes

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.

1 Like