Answer the question
In order to leave comments, you need to log in
Docker+Symfony and rights. How to be?
Hello.
I needed to raise the project to symphony, and I decided to use docker so as not to install a bunch of everything on the host machine. I used the ready config .
Everything is fine, but before it took off, I had to go into the container where puffed and chown accordingly for the entire /var, where the cache, logs and sessions are located.
Can you please tell me how can I make a common owner for a specific directory both on the host machine and in the container in order to avoid such situations? Or is this problem solved in some other way?
Answer the question
In order to leave comments, you need to log in
Are you running docker with sudo? Could this be the issue?
If yes, here is the manual about this case: https://docs.docker.com/engine/installation/linux/...
Create USER in container c id, host gid. Example - https://github.com/AfsmNGhr/dockemacs/blob/master/... . Need ENTRYPOINT - https://github.com/AfsmNGhr/dockemacs/blob/master/... And there is no difference in rights.
We clone the turnip,
take the Dockerfile, add Buildim
to it
=)
Rights in the docker - one of the sore spots.
There is no universal solution, there are many manual solutions.
As an option: forward the UID and GID of the current user to the container, create a user with these UID and GID in the Dockerfile, and change the owner of all project files to this user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question