Docker service create complete, no error, but mounted share is empty

Greetings.

On my Ubuntu 16.04 laptop, I did a ‘docker service create’ with two --mount statements. the command ran to completion, and service is running as well. But when I ‘docker exec’ into the service container, the mount point has nothing, meaning the share from the VM didn’t actually mount.

But a service inspect doesn’t show any error, and the volume mount section shows the correct source and target.

Where should I look for reason of the mount failure?

thanks much for any insight

use volumes instead of mounts :wink:

thanks for responding.

But ‘docker create service’ seems to have no option for volumes, only --mount.

Oh sorry.
I never use docker service create but usualy, write a compose file which I apply with a docker stack deploy to create services. And indeed docker service create dont allow to use volume while creating a service in a stack allow for it.
You might want to try using compose files.

Wow, thanks so much! that opened my mind to learning stack. I do need a few containers to form a processing chain.

Just keep in mind there is no way to update the configuration of an existing volume. In order to update its configuration, you will need to remove it and redeploy it with the new configuration.