我有一个使用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**