Comments (5)
Hello
Please try to use next docker-compose.yml path mapping:
1)Nginx - ./:/var/www/html:ro,cached
2)Laravel - ./:/var/www/html:cached
And inform us if it helps
from docker-nginx-php-laravel.
Hi, thanks for the swift response, but no, this doesn't seem to have any effect.
Although, I found that if I set
1)Nginx - ./:/var/www/html/random-folder:ro,cached
2)Laravel - ./:/var/www/html/random-folder:cached
then all the files are copied in the /html folder (supposedly correctly so + correct permissions according to Dockerfile, www-data:www-data) + html/random-folder/docker (root:root) + html/random-folder/mysql-data(root:root) in the Laravel container, but still the same as before in the nginx container (root:root).
I am not quite sure what to make of this, or how to get around it..
from docker-nginx-php-laravel.
First of all please follow recommendations from the docker-compose Team - docker/compose#9814
Make sure that you don't have other changes on your local docker-nginx-php-laravel
Please provide more info about the error that you have now
from docker-nginx-php-laravel.
I followed everything I could find, but the only thing that helped eventually was to go in Docker Desktop, in resources and manually add /var/www/html as a folder sharing location. This solved the problem of files not getting copied over.
I still can't run make composer-install (I can composer install inside the container) or make env-dev (but I can cp .env.dev .env inside the container). Even After I do that I get a 502 from Nginx. The permissions also don't seem to be correct, everything is root:root.
I run the same thing on my work mac and it just took 10 minutes to download everything but is working out of the box as intended. This has definitely something to do with Linux permissions, so I guess this issue can be closed as it was about file sharing between host and containers.
from docker-nginx-php-laravel.
Please make sure that you are not logged in as a root user on your Linux. Try to create additional user and check once again.
from docker-nginx-php-laravel.
Related Issues (20)
- I cant exec it
- an unexpected error
- cron job HOT 1
- error for nginx
- Nginx error. [emerg] 1#1: host not found in upstream "laravel" in /etc/nginx/conf.d/default.conf:59 HOT 11
- vite & npm missing from container HOT 2
- can't connect to the database HOT 3
- make migrate throws error in SQL HOT 4
- No Redis included? HOT 2
- How to add SSL cert? HOT 1
- Why we need to run composer install inside the docker file, if it will be overwritten with volumes. HOT 11
- Unable to start MySQL 8 container HOT 5
- Composer:latest HOT 4
- domain and subdomain in nginx HOT 1
- Question: Require private repo HOT 2
- Question: Domain name HOT 4
- unable to connect to dbbeaver HOT 2
- php-dev has no installation candidate HOT 2
- Why not create a Docker for choice a laravel version? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nginx-php-laravel.