Skip to content

Commit

Permalink
dockerfix
Browse files Browse the repository at this point in the history
  • Loading branch information
altendorfme committed Feb 7, 2025
1 parent c54b89e commit cfc13da
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Stage 1
FROM php:8.3-fpm
# Stage 0: Base
FROM php:8.3-fpm AS base

# Install PHP dependencies and extensions
# Install dependencies and extensions
RUN apt-get update && apt-get install -y \
nginx \
nano \
procps \
psmisc \
zip \
git \
htop \
Expand All @@ -16,6 +17,9 @@ RUN apt-get update && apt-get install -y \
&& docker-php-ext-enable redis opcache \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Stage 1: Build stage
FROM base AS builder

# Copy OPCache configuration
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini

Expand All @@ -29,8 +33,8 @@ COPY app/ /app/
WORKDIR /app
RUN composer install --no-interaction --optimize-autoloader

# Stage 2: Final stage
FROM php:8.3-fpm
# Stage 2: Final
FROM base

# Copy necessary files from the builder stage
COPY --from=builder /usr/local/etc/php/conf.d/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
Expand Down

0 comments on commit cfc13da

Please sign in to comment.