I have a Dockerfile
for my Symfony application but the container doesn't have write permissions into the cache and logs directories.
I tried with the Symfony docs for permissions, but it is not working. I already set the container user to root, but the problem is the same.
Here is my Dockerfile
:
FROM trafex/alpine-nginx-php7:ba1dd422
RUN apk --update add git php7-sockets php7-bcmath php7-pdo_mysql php7-pdo && rm /var/cache/apk/* \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
COPY ./docker/nginx/nginx.conf /etc/nginx/nginx.conf
COPY . /var/www/html
RUN composer install \
--ignore-platform-reqs \
--no-interaction \
--no-plugins \
--no-scripts \
--prefer-dist
EXPOSE 8080
How can I set the correct permissions to run it?