vieux / docker-volume-sshfs

sshfs docker volume plugin
MIT License
592 stars 104 forks source link

/var/lib/docker issue on Mac OS #41

Closed NewNork closed 7 years ago

NewNork commented 7 years ago

Hi,

I'm trying to run Gitea using Docker volumes on a Mac (Docker CE 17.09). Creating a remote volume works as in

docker run -v sshvol:/test --rm alpine sh -c 'echo "Hello World" > /test/somefile'

will result in a remote file.

However, as soon as the container starts tinkering with /var/lib/docker, in this case I think it tries to change permissions in /var/lib/docker/plugins/<some_rather_long_string>/..., the container won't start but outputs an error

docker: Error response from daemon: chown /var/lib/docker/plugins//rootfs/mnt/volumes/: permission denied.

Obviously, on Mac OS there is no such thing as /var/lib/docker.

I've tried the :nocopy option of -v, but that ends the container as soon as it started without an error message.

Any suggestion how to approach this issue is greatly appreciated.

Cheers, U.

NewNork commented 7 years ago

Actually that shows up on any Docker setup that I've tried so far using postgres docker images

docker run -d -e POSTGRES_PASSWORD=... -v sshvol:/var/lib/postgresql/data -p 5432:5432 postgres:alpine

I've tried postgres:latest already.

NewNork commented 7 years ago

Seems to be a problem with handling of permissions with docker on remote systems and not an issue with vieux/sshfs