George Tzortzidis
George Tzortzidis

Reputation: 1

Mounting html files between 2 containers in Docker using sshfs

i am new to Docker.

I have created two docker images (both Ubuntu 20.04) and a network to use. In the first image i have installed apache2 web server and on the second one i have installed sshfs. I want my first image to mount (using sshfs) in the default path :/usr/local/apache2/htdocs/ a folder with html files contained in the second image.

Any suggestions on how to start? Thank you in advance.

Upvotes: 0

Views: 327

Answers (1)

Mustafa Güler
Mustafa Güler

Reputation: 1014

You can bind both of them to same volume on your machine. Use --volumes-from to bind them to same path.

Worth a read Docker volumes

Upvotes: 2

Related Questions