I’m trying to get a Docker setup up and running so I can do local development work but having issues with directory/file permissions for the runtime and assets.
Using Docker Compose I have the following setup (I’ve removed some details that aren’t needed for this example):
nginx: image: nginx privileged: true ports: - "80:80" links: - php volumes: - .:/var/www php: build: ./docker/fpm privileged: true volumes: - .:/var/www
Even though the directories are set to 777 on my local machine which in turn are 777 inside the container I get the following error:
PHP Warning – yii\base\ErrorException copy(/var/www/web/assets/37d7e2cc/yii.activeForm.js): failed to open stream: Permission denied
I’ve tried setting “dirMode” for my asset manager to 777 but it does not seem to pay any attention to it.
Am I missing something?
I find it hard to believe that I’m the only one having this issue but can’t seem to find anything online related to this.