Docker Community Forums

Share and learn in the Docker community.

Docker not writing to shared volume on container startup


(Echo4golfzed) #1

Good morning all,

I have a Virtualbox (latest edition)-based Ubuntu 18 server running on a Windows 10 Pro machine. I have a Windows folder (“data” on the Windows machine and “/media/sf_data” on the Unbuntu machine.) shared and can read and write to it successfully from the Ubuntu installation. The issue is that whenever I try to start a container with a volume using that share, the container cannot write to it.

example:

docker run -d --restart always -p 9000:9000 --name portainer -v /var/run/docker.sock:/var/run/docker.sock -v /media/sf_data/docker/portainer:/data portainer/portainer

The container will start if I use a non-shared directory on the Ubuntu machine, such as /var/docker/portainer in lieu of the share.

A little help please?

Thanks!
Jerry

edit 2: Firewalls disabled on VirtualBox host machine as well as the virtualbox Ubuntu server.

edit: Docker version info:

Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:24:51 2018
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.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:15 2018
OS/Arch: linux/amd64
Experimental: false