-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# 使用 PHP 官方镜像作为基础 | ||
FROM phpswoole/swoole:php8.3 | ||
#FROM phpswoole/swoole:5.1.2-php8.3 | ||
#FROM php:8.3-cli | ||
|
||
|
||
# 设置非交互式前端以避免交互式配置 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
|
||
RUN apt-get update && apt-get install -y \ | ||
libfreetype-dev \ | ||
libjpeg62-turbo-dev \ | ||
libpng-dev \ | ||
&& rm -r /var/lib/apt/lists/* \ | ||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ | ||
&& docker-php-ext-install -j$(nproc) gd | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
libc-client-dev \ | ||
libkrb5-dev \ | ||
&& rm -r /var/lib/apt/lists/* \ | ||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ | ||
&& docker-php-ext-install imap | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
libgmp-dev \ | ||
&& rm -r /var/lib/apt/lists/* \ | ||
&& docker-php-ext-install gmp | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
zip \ | ||
libzip-dev \ | ||
&& rm -r /var/lib/apt/lists/* \ | ||
&& docker-php-ext-install zip | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
libxml2-dev \ | ||
&& rm -r /var/lib/apt/lists/* \ | ||
&& docker-php-ext-install soap | ||
|
||
#RUN apt-get update \ | ||
# && apt-get install -y \ | ||
# libmagickwand-dev \ | ||
# && rm -r /var/lib/apt/lists/* \ | ||
# && echo | pecl install imagick \ | ||
# && docker-php-ext-enable imagick | ||
|
||
|
||
RUN docker-php-ext-install pdo pgsql bcmath intl | ||
|
||
RUN pecl install msgpack \ | ||
&& pecl install igbinary \ | ||
&& pecl install pcov \ | ||
&& echo | pecl install mongodb \ | ||
&& docker-php-ext-enable msgpack igbinary pcov mongodb | ||
|
||
# 配置并启用 PCNTL 扩展 | ||
RUN docker-php-ext-configure pcntl --enable-pcntl \ | ||
&& docker-php-ext-install pcntl | ||
|
||
COPY ./php.ini $PHP_INI_DIR/conf.d/docker-vars.ini | ||
|
||
|
||
# 调试工具 | ||
RUN apt-get update && apt-get install -y \ | ||
vim \ | ||
net-tools \ | ||
iputils-ping \ | ||
telnet \ | ||
wget \ | ||
dnsutils \ | ||
postgresql-client \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# 定义容器启动时执行的命令 | ||
CMD ["php", "--version"] |