Answer the question
In order to leave comments, you need to log in
How to set permissions on VOLUMES in docker?
Hello.
I decided to deal with Docker, I can’t solve one problem, logs with root rights are written to the logs directory. Project structure:
- hosts/
- images/
- php/
- logs/
- mysql/
- www/
- default.test/
docker-compose.yml
docker-compose.yml
version: '3'
services:
nginx:
image: nginx:latest
ports:
- "8000:80"
volumes:
- "./hosts:/etc/nginx/conf.d"
- "./www:/var/www"
- "./logs:/var/log/nginx"
links:
- "php"
php:
build: "./images/php"
volumes:
- "./www:/var/www"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question