Alpine安装php各种扩展
详细如下
#!/bin/sh
sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories
apk add --no-cache autoconf g++ libtool make curl-dev libxml2-dev linux-headers
echo "---------- Install mcrypt ----------"
apk add --no-cache libmcrypt-dev
docker-php-ext-install mcrypt
ech "---------- Install pdo_mysql ----------"
docker-php-ext-install -j 2 pdo_mysql
echo "---------- Install zip ----------"
docker-php-ext-install -j 2 zip
echo "---------- Install pcntl ----------"
docker-php-ext-install -j 2 pcntl
echo "---------- Install mysqli ----------"
docker-php-ext-install -j 2 mysqli
echo "---------- Install mbstring ----------"
docker-php-ext-install -j 2 mbstring
echo "---------- Install exif ----------"
docker-php-ext-install -j 2 exif
echo "---------- Install calendar ----------"
docker-php-ext-install -j 2 calendar
echo "---------- Install sockets ----------"
docker-php-ext-install -j 2 sockets
echo "---------- Install gettext ----------"
apk add --no-cache gettext-dev
docker-php-ext-install -j 2 gettext
echo "---------- Install shmop ----------"
docker-php-ext-install -j 2 shmop
echo "---------- Install bz2 ----------"
apk add --no-cache bzip2-dev
docker-php-ext-install -j 2 bz2
echo "---------- Install xsl ----------"
apk add --no-cache libxslt-dev
docker-php-ext-install -j 2 xsl
echo "---------- Install wddx ----------"
apk add --no-cache libxslt-dev
ocker-php-ext-install -j 2 wddx
echo "---------- Install curl ----------"
docker-php-ext-install -j 2 curl
echo "---------- Install mysql ----------"
docker-php-ext-install -j 2 mysql
echo "---------- Install wddx ----------"
docker-php-ext-install -j 2 wddx
echo "---------- Install readline ----------"
apk add --no-cache readline-dev
apk add --no-cache libedit-dev
docker-php-ext-install -j 2 readline
echo "---------- Install gmp ----------"
apk add --no-cache gmp-dev
docker-php-ext-install -j 2 gmp
echo "---------- Install ldap ----------"
apk add --no-cache ldb-dev
apk add --no-cache openldap-dev
docker-php-ext-install -j 2 ldap
echo "---------- Install redis ----------"
mkdir redis \
&& tar -xf redis-4.1.1.tgz -C redis --strip-components=1 \
&& ( cd redis && phpize && ./configure && make && make install ) \
&& docker-php-ext-enable redis
echo "---------- Install gd ----------"
apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j 2 gd
echo "---------- Install mhash ----------"
mkdir mhash \
&& tar -xf mhash-0.9.9.9.tar.gz -C mhash --strip-components=1 \
&& ( cd mhash && ./configure && make && make install )\
&& docker-php-source extract \
&& ( cd /usr/src/php && ./configure --with-mcrypt --with-mhash=/usr/local/include && make && make install )\
&& docker-php-source delete
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
原文链接:Alpine安装php各种扩展_打卤的博客-CSDN博客_alpine 安装php8 xml (opens new window)
上次更新: 2023/02/24, 20:47:23