Dockerfile
FROM php:5.6-apache
COPY config/php.ini /usr/local/etc/php/
RUN docker-php-ext-install mysql mysqli pdo pdo_mysql
RUN rm /var/log/apache2/access.log
RUN a2enmod rewrite
RUN a2enmod deflate
RUN a2enmod headers
docker-compose.yml
version: "2"
services:
www:
build: .
ports:
- "8001:80"
volumes:
- ./www:/var/www/html/
networks:
- default
I have a folder within www
that's called photos
. It's at www/photos
. I want to write files to it using my php upload function. I'm getting permission denied errors due to the fact that php-apache doesn't have write access to the volume. How to give apache write access?
/var/www/html/controllers/file.php
– Tim Daubenschütz