Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

mount volume sshfs between stack #75

Open
SqLL opened this issue Jan 13, 2020 · 0 comments
Open

mount volume sshfs between stack #75

SqLL opened this issue Jan 13, 2020 · 0 comments

Comments

@SqLL
Copy link

SqLL commented Jan 13, 2020

Hello everyone,

Goal
Is it possible than two different docker volume ssh use the same mountpoint?

Expected
Because I have two docker volume, i expect than there is two different mountpoint.
(Maybe that is a wrong assumption..)

Context :
In two separate docker stack, I describe a volume like this :

volumes:
  access-log:
  file-feedback:
    driver: vieux/sshfs:latest
    driver_opts:
      sshcmd: "$FILE_USER@$FILE_SSH_IP:/data/Store/file/feedbacks"
      IdentityFile: "/root/.ssh/$FILE_SSH_KEY"

stack1_file-feedback is created
that is fine and the volume and everything is working fine.

I use the same ssh user and file and mountpoint to create a new docker volume

volumes:
  access-log:
  file-feedback:
    driver: vieux/sshfs:latest
    driver_opts:
      sshcmd: "$FILE_USER@$FILE_SSH_IP:/data/Store/file/feedbacks"
      IdentityFile: "/root/.ssh/$FILE_SSH_KEY"

stack2_file-feedback is created

docker volume ls 
DRIVER               VOLUME NAME
vieux/sshfs:latest   stack1_file-feedback
vieux/sshfs:latest   stack2_file-feedback

let's have a closer view with docker inspect.

docker volume inspect stack1_file-feedback stack2_file-feedback | grep "/mnt/volumes/265b1674263688dc91b1ee6a2febace9"
        "Mountpoint": "/mnt/volumes/265b1674263688dc91b1ee6a2febace9",
        "Mountpoint": "/mnt/volumes/265b1674263688dc91b1ee6a2febace9",

but if we do a docker inspect I can see that have the same mountpoint or I declare them and create them in two stack to try to make some isolation.

Is it normal to have the same mountpoint?
Is it possible to specify the mountpoint ?
Is it possible to create a different mountpoint by stack or by settings opt?

If none options are available, I will probably create an external volume and reference it in both stack.

Kr,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant