update dockerfile to php 8.3

add php intl extension
change to official nodejs image and to nodejs 21
This commit is contained in:
Boy132 2024-04-18 20:47:42 +02:00
parent 3e239f9caa
commit fa46f78fd5
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
#!/bin/ash -e #!/bin/ash -e
cd /app cd /app
mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \ mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php8/ \
&& chmod 777 /var/log/panel/logs/ \ && chmod 777 /var/log/panel/logs/ \
&& ln -s /app/storage/logs/ /var/log/panel/ && ln -s /app/storage/logs/ /var/log/panel/

View File

@ -2,7 +2,7 @@
# Build the assets that are needed for the frontend. This build stage is then discarded # Build the assets that are needed for the frontend. This build stage is then discarded
# since we won't need NodeJS anymore in the future. This Docker image ships a final production # since we won't need NodeJS anymore in the future. This Docker image ships a final production
# level distribution # level distribution
FROM --platform=$TARGETOS/$TARGETARCH mhart/alpine-node:14 FROM --platform=$TARGETOS/$TARGETARCH node:21-alpine
WORKDIR /app WORKDIR /app
COPY . ./ COPY . ./
RUN yarn install --frozen-lockfile \ RUN yarn install --frozen-lockfile \
@ -10,13 +10,13 @@ RUN yarn install --frozen-lockfile \
# Stage 1: # Stage 1:
# Build the actual container with all of the needed PHP dependencies that will run the application. # Build the actual container with all of the needed PHP dependencies that will run the application.
FROM --platform=$TARGETOS/$TARGETARCH php:8.1-fpm-alpine FROM --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine
WORKDIR /app WORKDIR /app
COPY . ./ COPY . ./
COPY --from=0 /app/public/assets ./public/assets COPY --from=0 /app/public/assets ./public/assets
RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot certbot-nginx \ RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev icu-dev certbot certbot-nginx \
&& docker-php-ext-configure zip \ && docker-php-ext-configure zip \
&& docker-php-ext-install bcmath gd pdo_mysql zip \ && docker-php-ext-install bcmath gd intl pdo_mysql zip \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& cp .env.example .env \ && cp .env.example .env \
&& mkdir -p bootstrap/cache/ storage/logs storage/framework/sessions storage/framework/views storage/framework/cache \ && mkdir -p bootstrap/cache/ storage/logs storage/framework/sessions storage/framework/views storage/framework/cache \