S
S
symnoob2019-09-13 20:05:47
Docker
symnoob, 2019-09-13 20:05:47

Is it possible somehow to mount a folder in docker with container user rights?

Hello everyone,
Is it possible to somehow mount a folder in docker with container user rights?
snippet from my Docker-Compose:

version: "3.2"
services:
  php:
    build:
      context: './docker/php/php${PHP_VERSION}-fpm/'
    volumes:
      - ./html:/var/www/html
    container_name: php

The html folder is mounted, but not as desired with www-data users, but with root users ...
is it possible to cure this somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2019-09-14
@vitaly_il1

Does the container run with the www-data user?
Look at https://stackoverflow.com/questions/40462189/docke... for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question