-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_5.0.3_php8.1
68 lines (53 loc) · 1.7 KB
/
Dockerfile_5.0.3_php8.1
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# 使用 PHP 官方镜像作为基础
FROM phpswoole/swoole:5.0.3-php8.1
#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 pdo_pgsql 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
# 定义容器启动时执行的命令
CMD ["php", "--version"]