File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM node:24-alpine AS assets
2-
3- WORKDIR /app
4-
5- COPY package.json package-lock.json ./
6- RUN npm install
7-
8- COPY resources ./resources
9- COPY vite.config.js ./
10- RUN npm run build
11-
12-
13- FROM php:8.4-apache AS app
1+ FROM php:8.4-apache
142
153WORKDIR /var/www/html
164
175ENV APACHE_DOCUMENT_ROOT=/var/www/html/webroot
186
197RUN apt-get update \
20- && apt-get install -y --no-install-recommends git unzip libicu-dev libzip-dev \
8+ && apt-get install -y --no-install-recommends ca-certificates curl git gnupg unzip libicu-dev libzip-dev \
9+ && mkdir -p /etc/apt/keyrings \
10+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
11+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \
12+ && apt-get update \
13+ && apt-get install -y --no-install-recommends nodejs \
2114 && docker-php-ext-install intl pdo_mysql zip \
2215 && a2enmod rewrite headers expires \
2316 && sed -ri "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/sites-available/000-default.conf /etc/apache2/apache2.conf \
@@ -26,7 +19,9 @@ RUN apt-get update \
2619COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
2720
2821COPY . .
29- COPY --from=assets /app/webroot/ ./webroot/
22+
23+ RUN npm install \
24+ && npm run build
3025
3126RUN composer install \
3227 --no-dev \
You can’t perform that action at this time.
0 commit comments