Answer the question
In order to leave comments, you need to log in
Windows. Docker. volume. user owner?
How to transfer user rights to the project on Windows in docker container?
Saw solutions for Linux, by passing uid, gid. But for Windows, I don't know how it can be applied.
I have created a user in the container and I want them to stay with it. But when I mount the folder from the host machine, I get the owner root.
Or leave it under windows and run php-fpm as root?
Answer the question
In order to leave comments, you need to log in
Generally. don't specify the "USER" directive in the dockerfile and work as root.
A slightly perverse solution, but you can try.
In the container, create a user with the same uid/gid as the host user. Next, start the container as usual (the launch will happen as the root user). After that, start all services (php-fpm, nginx, etc.) and use su 'user' to switch to the created user.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question