我的 php 容器没有权限在已挂载的卷上写入缓存。
码头工人-compose.yml:
version: '2'
volumes:
database_data:
driver: local
services:
php:
build: ./docker/php/
expose:
- 9000
volumes:
- ./public:/var/www/html
working_dir: /var/www/html
nginx:
image: nginx:latest
depends_on:
- php
ports:
- 80:80
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
volumes_from:
- php
码头工人/php/码头工人文件:
FROM php:7.0-fpm
RUN docker-php-ext-install pdo_mysql \
&& docker-php-ext-install json
# Permission fix
RUN usermod -u 1000 www-data