Docker stack deploy volume mappings

Hi,
I use docker stack deploy to deploy services into swarm.

When I use volume mappings such as
volumes:
- ${HOME}/stack/logs/:/usr/local/tomcat/logs/

I can see error invalid mount config for type…
in docker stack ps STACK_NAME report

I also found this happens only if the host folder structure does not exist

My assumption is this is a bug.
Have you come across the same issue?

1 Like

Hi. The volume will be shared between docker container and docker machine here. Not between docker container and host machine.

We need to find how to share volume between container and host using swarm or container to docker machine and docker machine to host.