docker:
启动命令
docker run -it -d --name dpclient -p 443:443 -p 80:80 -e SYSID=9230226386425031553 -e CLIENT_GET_RULE_URL=http://159.226.226.29/client/getInvalidRules -e CLIENT_GET_BLACKLIST_URL=http://159.226.226.29/client/getBlackList -v /usr/local/openresty/nginx/dpguard.conf:/usr/local/openresty/nginx/conf/conf.d -v /usr/local/openresty/nginx/html:/usr/local/openresty/nginx/html dpclient:1.0
docker-compose:
1、启动命令:docker-compose -f nginx-compose.yml up -d
2、docker-compose文件:
dpclient : #名称
image: dpclient :latest #镜像来源
ports: #暴露端口
- 80:80
- 443:443
environment: #环境
- SYSID=9230226386425031553
- CLIENT_GET_RULE_URL=http://159.226.226.29/client/getInvalidRules
- CLIENT_GET_RULE_URL=http://159.226.226.29/client/getInvalidRules
volumes: #卷映射
-/usr/local/openresty/nginx/dpguard.conf:/usr/local/openresty/nginx/conf/conf.d #指定目标文件
-/usr/local/openresty/nginx/html:/usr/local/openresty/nginx/html dpclient:1.0 #指定目标文件
restart: always #启动策略
网友评论