Bootstrap FreeKB - Docker - Resolve "error while creating mount source path"
Docker - Resolve "error while creating mount source path"

Updated:   |  Docker articles

Let's say you are attempting to create a Docker container using the docker run command with the -v or --volume option to mount a volume.

sudo docker run --name my_container --volume /usr/local/docker/fuse:/app/fuse my_image

 

And something like this is being returned.

error while creating mount source path '/usr/local/docker/fuse':
mkdir /usr/local/docker/fuse: file exists

 

This can occur when attempting to mount a FUSE share. I happened upon this when attempting to mount an Amazon Web Services (AWS) S3 Bucket in one of my Docker containers.

~]$ mount | grep fuse
s3fs on /usr/local/docker/fuse type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

 

You can try updating /etc/fuse.conf to have the user_allow_other directive.

~]$ cat /etc/fuse.conf
# mount_max = 1000
user_allow_other

 

And then mount the FUSE share with the allow_other or allow_root option.

s3fs my-bucket-abcdefg /usr/local/docker/ffuse/ -o passwd_file=${HOME}/.passwd-s3fs -o allow_other

 

And the mount command should then have the allow_other or allow_root option.

~]$ mount | grep s3
s3fs on /usr/local/docker/fuse type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,allow_other)

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter c5b8e9 in the box below so that we can be sure you are a human.