from openresty https://hub.docker.com/r/openresty/openresty
248
docker build -t tannnn/openresty:1.25.3.1 .
docker run --name nginx -p 80:80 -p 443:443 tannnn/openresty:1.25.3.1
docker run -d
- /usr/local/openresty/nginx/htmlcust 自定义页面内容 , ps: 后续可以在这里添加新的页面,也可以自己映射一个目录
- /usr/local/openresty/nginx/html 默认页面内容
- /usr/local/openresty/https ssl 证书存放目录
- /usr/local/openresty/nginx/conf/nginx.conf nginx著配置文件 , ps : include /etc/nginx/conf.d/*.conf; 所以这个文件不要动,只需要修改或添加 conf/目录中的文件
- /etc/nginx/conf.d/ nginx配置文件集合
docker run -v "./htmlcust:/usr/local/openresty/nginx/htmlcust" tannnn/openresty:1.25.3.1
docker run -e TZ=Asia/Shanghai
# docker-compose -f docker-compose-nginx.yml -p nginx up -d
version: '3'
services:
openresty:
image: tannnn/openresty:1.25.3.1
container_name: nginx
privileged: true
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "100m"
volumes:
# - "./conf/:/etc/nginx/conf.d/"
# - "./htmldef:/usr/local/openresty/nginx/html"
# - "./htmlcust:/usr/local/openresty/nginx/htmlcust"
- "./log:/usr/local/openresty/nginx/logs"
# - "./https:/usr/local/openresty/https"
# - "./mconf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf"
ports:
- "80:80"
- "443:443"
Content type
Image
Digest
sha256:5dff8320f…
Size
49.3 MB
Last updated
over 2 years ago
docker pull tannnn/openresty:1.25.3.1