This repository has been archived on 2025-06-09. You can view files and clone it, but cannot push or open issues or pull requests.

32 lines
1.4 KiB
Docker
Raw Normal View History

2025-05-29 11:23:06 +08:00
FROM php:8.3-fpm
# ---- system & PHP extensions -------------------------------------------------
2025-05-29 11:23:06 +08:00
RUN apt-get update && apt-get install -y \
git unzip zip curl ca-certificates supervisor cron nano \
libpng-dev libjpeg62-turbo-dev libfreetype6-dev \
2025-05-29 11:23:06 +08:00
libonig-dev libxml2-dev libzip-dev libpq-dev libicu-dev libxslt-dev \
libsqlite3-dev sqlite3 default-mysql-client \
2025-06-02 10:17:50 +08:00
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g npm \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd pdo_mysql zip bcmath intl xsl pcntl sockets \
&& docker-php-ext-install opcache \
&& pecl install redis && docker-php-ext-enable redis \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2025-05-29 11:23:06 +08:00
# ---- composer ---------------------------------------------------------------
2025-05-29 11:23:06 +08:00
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
2025-06-02 10:17:50 +08:00
# ---- config files -----------------------------------------------------------
COPY docker/php/php.ini /usr/local/etc/php/conf.d/custom-php.ini
COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY docker/entrypoint.sh /entrypoint.sh
COPY docker/entrypoint.git.sh /entrypoint.git.sh
2025-06-02 10:17:50 +08:00
WORKDIR /var/www
2025-06-02 10:17:50 +08:00
RUN chmod +x /entrypoint.sh /entrypoint.git.sh
2025-06-02 10:17:50 +08:00
ENTRYPOINT ["/entrypoint.sh"]
CMD ["docker-php-entrypoint", "php-fpm"]