reading fstab to mount sshfs in container

I'm using Docker to create an image from openjdk:8-jdk-alpine and trying to mount a remote folder using sshfs + fuse. in order to do that I run the container with docker run -d --rm --device /dev/fuse --privileged my_container

the code in the Dockerfile I put the following lines:

this line basically add to /etc/fstab the command to mount remote folder using sshfs.
when I access the container, I can't see the files in my mount_folder, but when i manually run

$mount -a

the folder is successfully mounted.
how can I make this automatically mounted when container starts?

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论