This commit is contained in:
feng0207
2026-08-11 22:22:10 +08:00
commit 5e312c1266
6985 changed files with 1061169 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
ARG PHP_BASE_IMAGE=php:7.4-cli
ARG COMPOSER_IMAGE=composer:latest
FROM ${PHP_BASE_IMAGE}
RUN set -eux; \
apt-get update && apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
libssl-dev \
unzip \
git \
default-mysql-client \
; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-install -j$(nproc) gd pdo_mysql bcmath zip pcntl; \
pecl install redis-5.3.7; \
docker-php-ext-enable redis; \
pecl install swoole-4.8.11; \
docker-php-ext-enable swoole; \
rm -rf /var/lib/apt/lists/* /tmp/pear
COPY --from=${COMPOSER_IMAGE} /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
COPY swoole.php /tmp/swoole_docker.php
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 20108
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]