-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrec.nginx.sh
23 lines (21 loc) · 900 Bytes
/
rec.nginx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
docker stop n1 n2 && docker rm n1 n2
#--privileged=true 容器内root权限运行
docker run -itd --name n1 \
--privileged=true --restart=always \
-p 8080:80 \
--network=mybridge --ip=172.1.2.11 \
-v /etc/timezone:/etc/localtime \
-v /home/wwwroot/cluster/openresty.a/conf:/usr/local/openresty/nginx/conf \
-v /home/wwwroot/cluster/openresty.a/logs:/usr/local/openresty/nginx/logs \
-v /home/wwwroot/cluster/html:/usr/local/openresty/nginx/html \
openresty/openresty:stretch
docker run -itd --name n2 \
--privileged=true --restart=always \
-p 8082:80 \
--network=mybridge --ip=172.1.2.12 \
-v /etc/timezone:/etc/localtime \
-v /home/wwwroot/cluster/openresty.b/conf:/usr/local/openresty/nginx/conf \
-v /home/wwwroot/cluster/openresty.b/logs:/usr/local/openresty/nginx/logs \
-v /home/wwwroot/cluster/html:/usr/local/openresty/nginx/html \
openresty/openresty:stretch