docker:挂载fuse目录:表示目录不存在



我有一个使用sftpman安装的fuse目录。

sftpman setup --id "some_fuse_directory" --host "xx.xxx.x.xx" --user "root" 
--mount_point "/path/on/server/to/see" --auth_method=publickey --ssh_key "/home/user/.ssh/id_rsa"
and then
sftpman mount some_fuse_directory

然后我可以在/mnt/sshfs/some_fuse_directory上看到文件夹/path/on/server/to/see

例如:

/mnt/sshfs/some_fuse_directory

现在我尝试将这个目录装载到docker compose 中的容器中

webapp:
image: "python-3.7.9-buster"
volumes:
- type: bind
source: /mnt/sshfs/some_fuse_directory
target: /root/some_fuse_directory 

当我尝试docker合成时,它说/mnt/sshfs/some_fuse_directory不存在

以这种方式使用音量;

webapp:

image: "python-3.7.9-buster"
volumes:
**- /mnt/sshfs/some_fuse_directory:/root/some_fuse_directory** 

最新更新