Comments (4)
One issue is without volume the code doesn’t automatic update. But seems the design of volume doesn’t allow modifying the files from inside the docker, so a trade-off.
from docker-lumen.
Hey @leckylao
Thanks for reporting that issue.
This is a known docker-ism. One thing we could do is set the container uid to match the host machine's from inside the docker-compose.yml
file.
service1:
user: "$UID:$GID"
...
Can you please test that and make a PR accordingly?
Thanks!
from docker-lumen.
Hi @saada, that user variable works. So what I did is checking the files belong to which user
docker-compose exec php ls -la /var/www/html
total 112
drwxr-xr-x 1 1000 staff 442 Jun 30 12:06 .
drwxr-xr-x 4 root root 4096 Jun 30 12:06 ..
-rw-r--r-- 1 1000 staff 12288 Jun 30 12:06 .Dockerfile.swp
-rw-r--r-- 1 1000 staff 310 Jun 30 12:06 Dockerfile
and adding
user: “1000”
this way you will see the process runs with the same user
docker-compose exec php ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
1000 1 1.7 0.8 123512 17136 ? Ss 12:09 0:00 php-fpm: master
1000 5 0.0 0.3 123512 7944 ? S 12:09 0:00 php-fpm: pool w
1000 6 0.0 0.3 123512 7944 ? S 12:09 0:00 php-fpm: pool w
1000 7 0.0 0.0 17500 2012 ? Rs+ 12:09 0:00 ps -aux
The other way is using environment variable
export UID
and set
user: “${UID}”
from docker-lumen.
awesome!
I'll go ahead and close this issue. You could still submit a PR if you like.
Thank you
from docker-lumen.
Related Issues (20)
- Just trying to run from scratch - error docker-php-ext-install instruction HOT 1
- File not found HOT 1
- Add https support HOT 3
- nginx.conf /var/www/html/public does not exist (on Mac) HOT 1
- alairock/lumen no longer exists HOT 2
- docker-php-ext-install soap doesn't work HOT 1
- Getting Error E: Unable to locate package php5-memcached HOT 2
- Getting Fatal Error HOT 1
- performance
- Add xdebug
- File not found HOT 5
- run php artisan migration HOT 1
- How would you run artisan commands ? HOT 1
- Permissions errors HOT 2
- Invalid value in docker-compose.yml HOT 1
- PDOException in Connector.php line 119: could not find driver HOT 1
- Docker new version HOT 4
- Class 'Memcached' not found HOT 3
- ERROR: for php Cannot start service php: oci runtime error: no such file or directory 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-lumen.