laravel_base
This commit is contained in:
73
php/Dockerfile
Normal file
73
php/Dockerfile
Normal file
@@ -0,0 +1,73 @@
|
||||
FROM php:8.3-fpm
|
||||
|
||||
# -----------------------------
|
||||
# Dependências do sistema
|
||||
# -----------------------------
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
unzip \
|
||||
supervisor \
|
||||
redis-server \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libfreetype6-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zip \
|
||||
npm \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# -----------------------------
|
||||
# Extensões PHP
|
||||
# -----------------------------
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install \
|
||||
pdo \
|
||||
pdo_mysql \
|
||||
mbstring \
|
||||
exif \
|
||||
pcntl \
|
||||
bcmath \
|
||||
gd \
|
||||
zip \
|
||||
sockets
|
||||
|
||||
# -----------------------------
|
||||
# Redis PHP extension
|
||||
# -----------------------------
|
||||
RUN pecl install redis \
|
||||
&& docker-php-ext-enable redis
|
||||
|
||||
# -----------------------------
|
||||
# Composer
|
||||
# -----------------------------
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# -----------------------------
|
||||
# Diretórios necessários
|
||||
# -----------------------------
|
||||
RUN mkdir -p /var/log/supervisor \
|
||||
/var/run/supervisor
|
||||
|
||||
# -----------------------------
|
||||
# Diretório da aplicação
|
||||
# -----------------------------
|
||||
WORKDIR /eap
|
||||
|
||||
|
||||
# -----------------------------
|
||||
# Supervisor config
|
||||
# -----------------------------
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# -----------------------------
|
||||
# Expor PHP-FPM
|
||||
# -----------------------------
|
||||
EXPOSE 9000
|
||||
|
||||
# -----------------------------
|
||||
# Inicialização
|
||||
# -----------------------------
|
||||
CMD ["/usr/bin/supervisord", "-n"]
|
||||
Reference in New Issue
Block a user