-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 920 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (22 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM php:8.2-fpm-bullseye
# Install system dependencies and PHP extensions
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git unzip libicu-dev libpq-dev libzip-dev \
&& docker-php-ext-install -j$(nproc) intl pdo_pgsql bcmath \
&& pecl install redis \
&& docker-php-ext-enable redis \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
# Copy application source
COPY . /var/www/html
# PHP-FPM listen override so nginx can reach it across containers
COPY docker/php-fpm/zz-override.conf /usr/local/etc/php-fpm.d/zz-override.conf
# Entrypoint to install deps, wait for DB, migrate, cache, etc.
COPY docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 9000
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["php-fpm"]