clean-docker / Magento2

Docker Image to Magento 2 local development in Mac, Linux and Windows
https://hub.docker.com/r/rafaelcgstz/magento2/
MIT License
444 stars 251 forks source link

Erro instalação Windows 10 - Ubuntu WSL #62

Closed CajuCLC closed 5 years ago

CajuCLC commented 6 years ago

Oi Rafael, estou com um probleminha. Tentei rodar a instalação seguindo o seu tutorial, mas no Ubuntu WSL no Windows 10 não está terminando a instalação. Logo depois de rodar o install-magento2 ele passa vários minutos instalando várias coisas, mas depois de um tempo este erro aparece:

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 '/var/www/env.sample.php' -> './app/etc/env.php' /usr/local/bin/install-magento2: line 27: n98: command not found 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 cp: cannot stat '/var/www/.composer/auth.json': No such file or directory npm ERR! Linux 4.9.87-linuxkit-aufs npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" npm ERR! node v6.14.3 npm ERR! npm v3.10.10 npm ERR! path /var/www/.npm/time-grunt npm ERR! code EACCES npm ERR! errno -13 npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/var/www/.npm/time-grunt' npm ERR! at Error (native) npm ERR! { Error: EACCES: permission denied, mkdir '/var/www/.npm/time-grunt' npm ERR! at Error (native) npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/var/www/.npm/time-grunt', npm ERR! parent: 'magento2' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! /var/www/html/npm-debug.log 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

Sabe o que pode ser? Algo que eu imagino é que como estou rodando o comando do WSL e o docker dentro do Ubuntu conecta ao Docker que roda no Windows, o Ubuntu talvez não esteja tendo permissão de escrita. Já tive problema parecido com o MySQL, mas já resolvi localmente.

Obrigado.

CajuCLC commented 5 years ago

Irei fechar o issue pq eu movi meu docker para o Ubuntu para rodar em um sistema mais amigavel para containers. Mas acredito que o problema era permissao de pasta sim e existe este tutorial que eu nao testei: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly