mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-09-04 19:51:10 +00:00
dockerfix
This commit is contained in:
parent
c54b89eb15
commit
cfc13da108
1 changed files with 9 additions and 5 deletions
14
Dockerfile
14
Dockerfile
|
@ -1,11 +1,12 @@
|
||||||
# Stage 1
|
# Stage 0: Base
|
||||||
FROM php:8.3-fpm
|
FROM php:8.3-fpm AS base
|
||||||
|
|
||||||
# Install PHP dependencies and extensions
|
# Install dependencies and extensions
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
nginx \
|
nginx \
|
||||||
nano \
|
nano \
|
||||||
procps \
|
procps \
|
||||||
|
psmisc \
|
||||||
zip \
|
zip \
|
||||||
git \
|
git \
|
||||||
htop \
|
htop \
|
||||||
|
@ -16,6 +17,9 @@ RUN apt-get update && apt-get install -y \
|
||||||
&& docker-php-ext-enable redis opcache \
|
&& docker-php-ext-enable redis opcache \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Stage 1: Build stage
|
||||||
|
FROM base AS builder
|
||||||
|
|
||||||
# Copy OPCache configuration
|
# Copy OPCache configuration
|
||||||
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||||
|
|
||||||
|
@ -29,8 +33,8 @@ COPY app/ /app/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN composer install --no-interaction --optimize-autoloader
|
RUN composer install --no-interaction --optimize-autoloader
|
||||||
|
|
||||||
# Stage 2: Final stage
|
# Stage 2: Final
|
||||||
FROM php:8.3-fpm
|
FROM base
|
||||||
|
|
||||||
# Copy necessary files from the builder stage
|
# 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
|
COPY --from=builder /usr/local/etc/php/conf.d/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||||
|
|
Loading…
Add table
Reference in a new issue