Fix dockerimage with docker-compose

This commit is contained in:
Krzysztof Haller 2024-02-28 09:26:30 +01:00
parent 9fab5451f5
commit 36626f2d76
2 changed files with 7 additions and 9 deletions

View file

@ -12,7 +12,7 @@ services:
ports:
- 80:80
volumes:
- "../:/var/www/html:delegated"
- "../:/var/www/html"
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"
networks:
- laravel

View file

@ -1,16 +1,14 @@
FROM php:8.0-fpm-alpine3.13
FROM php:8.1-fpm-buster
RUN apt-get update \
&& apt-get install -y build-essential zlib1g-dev default-mysql-client curl gnupg procps vim git unzip libzip-dev libpq-dev libicu-dev libonig-dev libpng-dev libjpeg-dev libfreetype6-dev
RUN apk update && apk upgrade
RUN apk add --no-cache --repository https://alpine.global.ssl.fastly.net/alpine/edge/community/
RUN apk add --no-cache curl-dev icu-dev libzip-dev
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip
RUN docker-php-ext-install mysqli pdo pdo_mysql intl zip gd bcmath
ADD ./docker/php/www.conf /usr/local/etc/php-fpm.d/
RUN mkdir -p /var/www/html
RUN addgroup -g 1000 laravel && adduser -G laravel -g laravel -s /bin/sh -D laravel
RUN addgroup --gid 1000 laravel && adduser --ingroup laravel --uid 1000 --shell /bin/sh --disabled-password --gecos "" laravel
RUN chown laravel:laravel /var/www/html
WORKDIR /var/www/html