fballiano / docker-magento2

Cluster ready Magento2 + Varnish 7 + PHP 8.1 + Redis 6.2 + Elasticsearch 7.17 + SSL
355 stars 164 forks source link

Cannot read contents from file #20

Open CajuCLC opened 6 years ago

CajuCLC commented 6 years ago

Hi there. I have tried using this repo with Magento EE 2.2.2, but getting this error: Fatal error: Uncaught Magento\Framework\Exception\FileSystemException: Cannot read contents from file "/var/www/html/app/etc/di.xml" Warning!file_get_contents(/var/www/html/app/etc/di.xml): failed to open stream: No such file or directory in /var/www/html/vendor/magento/framework/Filesystem/Driver/File.php:149 Stack trace: #0 /var/www/html/vendor/magento/framework/Filesystem/File/Read.php(100): Magento\Framework\Filesystem\Driver\File->fileGetContents('/var/www/html/a...', NULL, NULL) #1 /var/www/html/vendor/magento/framework/Config/FileIterator.php(71): Magento\Framework\Filesystem\File\Read->readAll() #2 /var/www/html/vendor/magento/framework/Config/Reader/Filesystem.php(146): Magento\Framework\Config\FileIterator->current() #3 /var/www/html/vendor/magento/framework/Config/Reader/Filesystem.php(130): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator)) #4 /var/www/html/vendor/magento/framework/App/ObjectManagerFactory.php(275): Magento\Framework\Config\Reader\Filesystem-> in /var/www/html/vendor/magento/framework/App/ObjectManagerFactory.php on line 277

Windows 10 (using Powershell or WSL). Folder has all permissions. When I log into the container (Apache) all files are with roo:root permission. Is this correct?

CajuCLC commented 6 years ago

BTW, I am getting same error using Magento 2.2.4 that I downloaded from Magento.

Dnyomo commented 6 years ago

@CajuCLC Were you able to find an solution to this problem? I am seeing the same problem with 2.2.5.

clifinger commented 6 years ago

No news ?

CajuCLC commented 6 years ago

No update from me, I honestly just decided to build my own Docker. :)

fballiano commented 6 years ago

sorry guys I don't have a windows machine to try it, it never happened to me on mac (although I've to say I don't use it that much)

clifinger commented 6 years ago

It work for me with docker-sync and WSL. My repo based on Laradock: Magento2onwindows I followed docker-sync-on-Windows. I start Magento on Windows by WSL ./sync.sh nginx mysql phpmyadmin. I will clean later but it work ! I can even change the user permissions inside the volume. You have this problem because you use CIFS when you share a volume on Docker for Windows and win don't support chmod ! With docker-sync the volume will be available to be acceded on Windows but the storage will be on WSL so full speed like native Linux ... Just don't forget to put a :no-copy to not have double writing.

fballiano commented 5 years ago

is this still an issue on windows? i was trying to test it but docker needs windows pro or enterprise which I don't have