Skip to content

Commit cfc13da

Browse files
committed
dockerfix
1 parent c54b89e commit cfc13da

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
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
55
RUN 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
2024
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
2125

@@ -29,8 +33,8 @@ COPY app/ /app/
2933
WORKDIR /app
3034
RUN 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
3640
COPY --from=builder /usr/local/etc/php/conf.d/opcache.ini /usr/local/etc/php/conf.d/opcache.ini

0 commit comments

Comments
 (0)