File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1- # Stage 1
2- FROM php:8.3-fpm
1+ # Stage 0: Base
2+ FROM php:8.3-fpm AS base
33
4- # Install PHP dependencies and extensions
4+ # Install dependencies and extensions
55RUN apt-get update && apt-get install -y \
66 nginx \
77 nano \
88 procps \
9+ psmisc \
910 zip \
1011 git \
1112 htop \
@@ -16,6 +17,9 @@ RUN apt-get update && apt-get install -y \
1617 && docker-php-ext-enable redis opcache \
1718 && apt-get clean && rm -rf /var/lib/apt/lists/*
1819
20+ # Stage 1: Build stage
21+ FROM base AS builder
22+
1923# Copy OPCache configuration
2024COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
2125
@@ -29,8 +33,8 @@ COPY app/ /app/
2933WORKDIR /app
3034RUN composer install --no-interaction --optimize-autoloader
3135
32- # Stage 2: Final stage
33- FROM php:8.3-fpm
36+ # Stage 2: Final
37+ FROM base
3438
3539# Copy necessary files from the builder stage
3640COPY --from=builder /usr/local/etc/php/conf.d/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
You can’t perform that action at this time.
0 commit comments