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: RUN echo "sshfs#myuser@${host}:${folder} $mount_folder fuse allow_other,default_permissions,umask=0007,idmap=file,uidfile=/etc/sshfs_umap,gidfile=/etc/sshfs_gmap,nomap=ignore,StrictHostKeyChecking=no,IdentityFile=/root/.ssh/id_rsa 0 0" >> /etc/fstab this line basically add to /etc/fstab the command to mount remote folder using sshfs.
https://unix.stackexchange.com/questions/583183/reading-fstab-to-mount-sshfs-in-container