Use Volume Driver on Docker

network graph
Network topology
ssh -l ubuntu 10.1.1.13
sudo mkdir /share
sudo chmod 777 /share
exit
sudo docker plugin install --grant-all-permissions vieux/sshfs
sudo docker plugin ls
sudo docker plugin disable [PLUDIN ID]
sudo docker plugin set vieux/sshfs sshkey.source=/root/.ssh/
sudo docker plugin enable 86d094668892
sudo docker plugin ls
sudo docker volume create — driver vieux/sshfs -o sshcmd=root@10.1.1.13:/share -o allow_other sshvolume
sudo docker run -d — name=nginxtest-ssh -p 8090:80 -v sshvolume:/usr/share/nginx/html nginx:latest
ssh -l 10.1.1.13
sudo sh -c "echo 'Hello, I am hakim' > /share/index.html"
sudo cat /share/index.html
exit
sudo docker ps

--

--

Cloud DevOps Enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store