Sign inSign up

tannnn/openresty

By tannnn

Updated over 2 years ago

from openresty https://hub.docker.com/r/openresty/openresty

Image
Developer tools
Web servers
0

248

tannnn/openresty repository overview

build image

docker build -t tannnn/openresty:1.25.3.1 .

run image

 docker run --name nginx  -p 80:80 -p 443:443  tannnn/openresty:1.25.3.1

挂后台

docker run -d

volumes

  1. /usr/local/openresty/nginx/htmlcust 自定义页面内容 , ps: 后续可以在这里添加新的页面,也可以自己映射一个目录
  2. /usr/local/openresty/nginx/html 默认页面内容
  3. /usr/local/openresty/https ssl 证书存放目录
  4. /usr/local/openresty/nginx/conf/nginx.conf nginx著配置文件 , ps : include /etc/nginx/conf.d/*.conf; 所以这个文件不要动,只需要修改或添加 conf/目录中的文件
  5. /etc/nginx/conf.d/ nginx配置文件集合
 docker run  -v "./htmlcust:/usr/local/openresty/nginx/htmlcust" tannnn/openresty:1.25.3.1

environment

时区
docker run -e TZ=Asia/Shanghai

access page

  1. home page: http://127.0.0.1
  2. time page: http://127.0.0.1/time/

componse

# 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"

Tag summary

Content type

Image

Digest

sha256:5dff8320f

Size

49.3 MB

Last updated

over 2 years ago

docker pull tannnn/openresty:1.25.3.1