0

I used Easy Engine 4 to install set up a server for a website. They use Docker and it's causing me a problem.

How do I get volume from one site to access volume from another site? With common installation was only use relative path, but this does not work with Docker

I have something like

/opt/easyengine/sites/site1.com with real path in
/ var / lib / docker / volumes / site1com_htdocs / _data / htdocs / public

I would like to access a file that is in

 /opt/easyengine/sites/site2.com 
real path -> /var/lib/docker/volumes/site2com_htdocs/_data/htdocs/public

This is making me very confused, I don't know how I do it with docker

$files = scandir("/var/lib/docker/volumes/site2com_htdocs/_data/htdocs/public/gallery");
    var_dump($files);

<br />
<b>Warning</b>:  scandir(/var/lib/docker/volumes/site2com_htdocs/_data/htdocs/public/gallery): failed to open dir: No such file or directory in <b>/var/www/htdocs/index.php</b> on line <b>11</b><br />
<br />
<b>Warning</b>:  scandir(): (errno 2): No such file or directory in <b>/var/www/htdocs/index.php</b> on line <b>11</b><br />
Bruno Andrade
  • 565
  • 1
  • 3
  • 17
  • have you tried mapping the volume also into the container from which you are trying to access the file? If you can give more details about how you start the containers, that would help. – Mihai Sep 04 '19 at 05:06
  • You shouldn't be directly accessing content in `/var/lib/docker`, and if your server is running inside a container, you can't access other volumes without having them mounted at container start time. – David Maze Sep 04 '19 at 10:43

0 Answers0