-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't work volume option subpath in docker swarm mode #5826
Comments
I have a similar issue. Any guidance on what is wrong?
(this is true, the subpath doesn't exist, but I expect Docker to create one). I was getting this error on Docker for Desktop (Mac M1) and now on the real Linux machine with the latest Docker. OrbStack works fine on M1. In my case, I have crafted the API call myself (i.e. without using the Docker CLI):
|
+1 here, surprised this happens. It works fine with Is this because of old compose spec? I do not see subpath mentioned in https://github.com/docker/compose/blob/v1/docs/Compose%20file%20reference%20(legacy)/version-3.md#volume-configuration-reference |
I also ran into this same behavior. Is there any workaround to get the same behavior of using a Container B should only have access to the directory under the subpath, not to the whole volume. |
I just spent the whole day trying to figure out why my stack is not working as I expected, and at the end I realized it's about docker ignoring "subpath".
Are there any plans to start supporting subdirectories for swarm? |
I at least think there should be a warning message when deploying a stack that has a volume with |
Hi all!
I use docker swarm to access the directory inside the created volume (volume is test_volume, direcotry is test). Docker swarm consists of one machine, on which the volume is located. I use the same compose-file.
docker-compose up
mounts the required volume folder inside the containerdocker stack deploy --prune --compose-file docker-compose.yml test_2
This command only mounts the volume itself, but not the folder inside it, as I would expect from the commanddocker run --mount 'type=volume,src=test_volume,dst=/srv,volume-subpath=test' -it --entrypoint sh alpine:3.18.5
My docker-compose.yml
docker info:
The text was updated successfully, but these errors were encountered: