Fixed docker permissions

This commit is contained in:
Ramon Robben 2021-06-07 20:32:48 +02:00
parent 160a65ff2d
commit 21ea518d78
3 changed files with 9 additions and 9 deletions

View file

@ -12,7 +12,7 @@ services:
ports:
- 80:80
volumes:
- ../:/var/www/html:delegated
- "../:/var/www/html:delegated"
depends_on:
- php
- mysql
@ -42,7 +42,7 @@ services:
dockerfile: docker/php/Dockerfile
container_name: controlpanel_php
volumes:
- ../:/var/www/html:delegated
- "../:/var/www/html:delegated"
networks:
- laravel

View file

@ -1,10 +1,10 @@
FROM nginx:stable-alpine
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
ADD ./docker/nginx/nginx.conf /etc/nginx/
ADD ./docker/nginx/default.conf /etc/nginx/conf.d/
RUN mkdir -p /var/www/html
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
RUN chown laravel:laravel /var/www/html

View file

@ -6,16 +6,16 @@ RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/
RUN apk add --no-cache curl-dev icu-dev libzip-dev
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
RUN mkdir -p /var/www/html
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
RUN chown laravel:laravel /var/www/html
WORKDIR /var/www/html
RUN docker-php-ext-install pdo pdo_mysql
USER laravel
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer