Answer the question
In order to leave comments, you need to log in
How to properly set permissions on docker compose nginx+php-fpm stack files?
Greetings!
There is a project that is connected as a volume in docker compose to the nginx-alpine and php-fpm containers.
How to set permissions correctly so that nginx-alpine does not crash, php-fpm can create files and folders, and the programmer can freely edit the project from the host?
Answer the question
In order to leave comments, you need to log in
https://stackoverflow.com/questions/48619445/permi...
Make your Dockerfile something as below -
FROM php:7-fpm
WORKDIR /var/www
RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client && docker-php-ext-install mcrypt pdo_mysql
ADD . /var/www
RUN chown -R www-data:www-data /var/www
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question