Skip to content

Commit 10cf6aa

Browse files
author
张俊杰
committed
体检本地一波插件
1 parent 31c8698 commit 10cf6aa

File tree

6 files changed

+143
-9
lines changed

6 files changed

+143
-9
lines changed

docker-compose.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: '3.2'
1+
version: '3.4'
22
services:
33
#5.6
44
php:
@@ -9,12 +9,15 @@ services:
99
- ./php/php-fpm.d/:/etc/php-fpm.d/
1010
- ./www/:/www/
1111
- ./www_test/:/www_test/
12+
links:
13+
- mysql:mysql
1214

1315
#7.2
1416
php7:
1517
build: ./php7
1618
depends_on:
1719
- mysql
20+
- redis
1821
ports:
1922
- 9078:9001
2023
volumes:
@@ -23,7 +26,7 @@ services:
2326
- ./www_test/:/www_test/
2427
links:
2528
- mysql:mysql
26-
29+
- redis:redis
2730
nginx:
2831
build: ./nginx
2932
depends_on:
@@ -54,7 +57,6 @@ services:
5457

5558
redis:
5659
build: ./redis
57-
5860
ports:
5961
- 6378:6379
6062
volumes:

nginx/conf.d/blog.conf

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,50 @@ server {
3737
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
3838
include fastcgi_params;
3939
}
40-
}
40+
}
41+
42+
43+
server {
44+
45+
listen 80;
46+
47+
server_name www.geekstool.com geekstool.com;
48+
49+
index index.html index.htm index.php;
50+
root /www/geek/teek/public;
51+
52+
location / {
53+
try_files $uri $uri/
54+
/index.php$is_args$query_string;
55+
}
56+
57+
location /nginx_status
58+
{
59+
stub_status on;
60+
access_log off;
61+
}
62+
63+
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
64+
{
65+
expires 30d;
66+
}
67+
68+
location ~ .*\.(js|css)?$
69+
{
70+
expires 12h;
71+
}
72+
73+
74+
location ~ \.php(.*)$ {
75+
fastcgi_pass php7:9000;
76+
fastcgi_index index.php;
77+
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
78+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
79+
fastcgi_param PATH_INFO $fastcgi_path_info;
80+
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
81+
include fastcgi_params;
82+
}
83+
}
84+
85+
86+

nginx/conf.d/hack.conf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
server {
2+
listen 80;
3+
server_name hacker.com;
4+
root /www/hack/sqli-labs/sqli-labs;
5+
6+
location / {
7+
index index.php index.html;
8+
}
9+
10+
location ~ \.php(.*)$ {
11+
fastcgi_pass php:9000;
12+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
13+
include fastcgi_params;
14+
}
15+
}
16+
17+
18+
server {
19+
20+
listen 80;
21+
server_name webwechat.com;
22+
root /www/webWechat/public;
23+
24+
location / {
25+
index index.php index.html;
26+
try_files $uri $uri/
27+
/index.php$is_args$query_string;
28+
}
29+
30+
location ~ \.php(.*)$ {
31+
fastcgi_pass php7:9000;
32+
fastcgi_index index.php;
33+
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
34+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
35+
fastcgi_param PATH_INFO $fastcgi_path_info;
36+
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
37+
include fastcgi_params;
38+
}
39+
}
40+
41+
42+

nginx/conf.d/zend.conf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
server {
2+
listen 80;
3+
server_name zend.com;
4+
root /www/zend/path/to/install/public;
5+
6+
location / {
7+
index index.php;
8+
try_files $uri $uri/ @php;
9+
}
10+
11+
12+
location ~ \.php(.*)$ {
13+
fastcgi_pass php:9000;
14+
fastcgi_param SCRIPT_FILENAME /www/zend/path/to/install/public/index.php;
15+
include fastcgi_params;
16+
}
17+
}

php/Dockerfile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,17 @@ echo 'deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib' >
1212
echo 'deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' >> /etc/apt/sources.list
1313

1414
RUN apt-get update
15-
RUN apt-get install libxml2-dev
16-
17-
RUN docker-php-ext-install soap mysql mysqli pdo_mysql opcache \
15+
RUN apt-get install -y \
16+
libfreetype6-dev \
17+
libjpeg62-turbo-dev \
18+
libmcrypt-dev \
19+
libpng-dev \
20+
libxml2-dev \
21+
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
22+
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
23+
&& docker-php-ext-install -j$(nproc) gd
24+
25+
RUN docker-php-ext-install soap mysql mysqli pdo_mysql opcache \
1826
&& curl -sS https://getcomposer.org/installer | php \
1927
&& mv /var/www/html/composer.phar /usr/local/bin/composer \
2028
&& composer config -g repo.packagist composer https://packagist.phpcomposer.com
@@ -34,7 +42,6 @@ RUN curl 'http://pecl.php.net/get/redis-2.2.5.tgz' -o redis.tgz \
3442

3543

3644

37-
3845
#安装分词
3946
RUN curl 'http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2' -o scws.tar.bz2 \
4047
&& tar xvjf scws.tar.bz2 \

php7/Dockerfile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,34 @@ FROM php:7.1-fpm-jessie
22

33

44

5+
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
6+
echo 'deb http://mirrors.163.com/debian/ jessie main non-free contrib' > /etc/apt/sources.list && \
7+
echo 'deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib' >> /etc/apt/sources.list && \
8+
echo 'deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' >> /etc/apt/sources.list
9+
10+
RUN apt-get update
11+
RUN apt-get install -y \
12+
libfreetype6-dev \
13+
libjpeg62-turbo-dev \
14+
libmcrypt-dev \
15+
libpng-dev \
16+
libxml2-dev \
17+
libmagickwand-dev \
18+
libmagickcore-dev \
19+
&& docker-php-ext-install -j$(nproc) iconv mcrypt \
20+
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
21+
&& docker-php-ext-install -j$(nproc) gd
22+
523
# pecl貌似被墙了,http://pecl.php.net/ 要包自己下
624
RUN curl 'http://pecl.php.net/get/redis-4.0.2.tgz' -o redis.tgz \
725
&& pecl install redis.tgz \
826
&& curl 'http://pecl.php.net/get/xdebug-2.6.0.tgz' -o xdebug.tgz \
927
&& pecl install xdebug.tgz \
1028
&& curl 'http://pecl.php.net/get/swoole-4.0.2.tgz' -o swoole.tgz \
1129
&& pecl install swoole.tgz \
12-
&& docker-php-ext-enable redis xdebug swoole
30+
&& curl 'http://pecl.php.net/get/imagick-3.4.3.tgz' -o imagick.tgz\
31+
&& pecl install imagick.tgz \
32+
&& docker-php-ext-enable imagick redis xdebug swoole
1333

1434
RUN docker-php-ext-install mysqli pdo_mysql opcache\
1535
&& curl -sS https://getcomposer.org/installer | php \

0 commit comments

Comments
 (0)