diff --git a/openresty/1.21.4.1/22.03-lts-sp3/Dockerfile b/openresty/1.21.4.1/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..81333b791b72c566e16b573cf2838c36d3a54c5f --- /dev/null +++ b/openresty/1.21.4.1/22.03-lts-sp3/Dockerfile @@ -0,0 +1,50 @@ +ARG BASE=openeuler/openeuler:22.03-lts-sp3 +FROM ${BASE} +ARG VERSION="1.21.4.1" +RUN yum install -y gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel --nogpgcheck curl wget perl make tar \ + && cd /tmp \ + && curl -o openresty-${VERSION}.tar.gz https://openresty.org/download/openresty-${VERSION}.tar.gz \ + && tar zxvf openresty-${VERSION}.tar.gz \ + && cd openresty-${VERSION} \ + && ./configure \ + --prefix=/usr/local/openresty \ + --with-cc-opt='-O2 -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl111/include' \ + --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl111/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl111/lib' \ + --with-pcre-jit \ + --with-stream \ + --with-stream_ssl_module \ + --with-stream_ssl_preread_module \ + --with-http_v2_module \ + --without-mail_pop3_module \ + --without-mail_imap_module \ + --without-mail_smtp_module \ + --with-http_stub_status_module \ + --with-http_realip_module \ + --with-http_addition_module \ + --with-http_auth_request_module \ + --with-http_secure_link_module \ + --with-http_random_index_module \ + --with-http_gzip_static_module \ + --with-http_sub_module \ + --with-http_dav_module \ + --with-http_flv_module \ + --with-http_mp4_module \ + --with-http_gunzip_module \ + --with-threads --with-stream \ + --with-http_ssl_module \ + && make build \ + && make install \ + && cd /tmp \ + && rm -rf openresty-${VERSION}.tar.gz \ + && rm -rf openresty-${VERSION}/ \ + && yum clean all + +ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin +ENV LUA_PATH="/usr/local/openresty/site/lualib/?.ljbc;/usr/local/openresty/site/lualib/?/init.ljbc;/usr/local/openresty/lualib/?.ljbc;/usr/local/openresty/lualib/?/init.ljbc;/usr/local/openresty/site/lualib/?.lua;/usr/local/openresty/site/lualib/?/init.lua;/usr/local/openresty/lualib/?.lua;/usr/local/openresty/lualib/?/init.lua;./?.lua;/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/local/openresty/luajit/share/lua/5.1/?.lua;/usr/local/openresty/luajit/share/lua/5.1/?/init.lua" +ENV LUA_CPATH="/usr/local/openresty/site/lualib/?.so;/usr/local/openresty/lualib/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/usr/local/openresty/luajit/lib/lua/5.1/?.so" + +ENV PATH /usr/local/nginx:$PATH +WORKDIR /usr/local/nginx/html + +EXPOSE 80 +ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/openresty/README.md b/openresty/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4b6db62d9635c2a7c848a1e1987f7d77d8ea9ee8 --- /dev/null +++ b/openresty/README.md @@ -0,0 +1,65 @@ +# Quick reference + +- The official OpenResty docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# OpenResty | openEuler +Current OpenResty docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +OpenResty is a full-fledged web platform that integrates our enhanced version of the Nginx core, our enhanced version of LuaJIT, many carefully written Lua libraries, lots of high quality 3rd-party Nginx modules, and most of their external dependencies. It is designed to help developers easily build scalable web applications, web services, and dynamic web gateways. Learn more on [https://openresty.org/en/](https://openresty.org/en/)⁠. + +Features: +- OpenResty® is a full-fledged web platform that integrates our enhanced version of the Nginx core, our enhanced version of LuaJIT, many carefully written Lua libraries, lots of high quality 3rd-party Nginx modules, and most of their external dependencies. It is designed to help developers easily build scalable web applications, web services, and dynamic web gateways. + +- By taking advantage of various well-designed Nginx modules (most of which are developed by the OpenResty team themselves), OpenResty® effectively turns the nginx server into a powerful web app server, in which the web developers can use the Lua programming language to script various existing nginx C modules and Lua modules and construct extremely high-performance web applications that are capable to handle 10K ~ 1000K+ connections in a single box. + +- OpenResty® aims to run your server-side web app completely in the Nginx server, leveraging Nginx's event model to do non-blocking I/O not only with the HTTP clients, but also with remote backends like MySQL, PostgreSQL, Memcached, and Redis. + +# Supported tags and respective Dockerfile links +The tag of each `openresty` docker image is consist of the version of `openresty` and the version of basic image. The details are as follows +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[1.21.4.1-oe2203sp3](https://gitee.com/openeuler/openeuler-docker-images/blob/master/openresty/1.21.4.1/22.03-lts-sp3/Dockerfile)| openresty 1.21.4.1 on openEuler 22.03-LTS-SP3 | amd64, arm64 | + + +# Usage +In this usage, users can select the corresponding `{Tag}` and `container startup options` based on their requirements. + +- Pull the `openeuler/openresty` image from docker + + ```bash + docker pull openeuler/openresty:{Tag} + ``` + +- Start a openresty instance + + ```bash + docker run -d --name my-openresty -p 8080:80 openeuler/openresty:{Tag} + ``` + After the instance `my-openresty` is started, access the openresty service through `http://localhost:8080`. + +- Container startup options + + | Option | Description | + |--|--| + | `-p 8080:80` | Expose nginx on `localhost:8080`. | + | `-v /local/path/to/website:/usr/local/nginx/html` | Mount and serve a local website. | + | `-v /path/to/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf` | Local [configuration file](https://nginx.org/en/docs/)⁠ `nginx.conf`. | + +- View container running logs + + ```bash + docker logs -f my-openresty + ``` + +- To get an interactive shell + + ```bash + docker exec -it my-openresty /bin/bash + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/openresty/doc/image-info.yml b/openresty/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..7d8bc4cb7c639691bfbbda20cd60897f46898ca2 --- /dev/null +++ b/openresty/doc/image-info.yml @@ -0,0 +1,58 @@ +name: openresty +category: cloud +description: OpenResty是一个基于Nginx与Lua的高性能Web平台,其内部集成了大量精良的Lua库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态Web应用、Web服务和动态网关。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + openresty镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[1.21.4.1-oe2203sp3](https://gitee.com/openeuler/openeuler-docker-images/blob/master/openresty/1.21.4.1/22.03-lts-sp3/Dockerfile)| openresty 1.21.4.1 on openEuler 22.03-LTS-SP3 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/openresty:{Tag} + ``` + +usage: | + - 启动容器 + ``` + docker run -d --name my-openresty -p 8080:80 openeuler/openresty:{Tag} + ``` + 用户可根据自身需求选择对应版本的{Tag}、容器启动的选项。`my-openresty`启动之后,通过`http://localhost:8080`访问openresty服务。 + + - 启动参数 + + | Parameter | Description | + |----------------|---------------| + | -p 8080:80 | 暴露Nginx服务端口 | + | -v /local/path/to/website:/usr/local/nginx/html | 挂载本地网页进行服务 | + | v /path/to/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf | 使用本地配置文件 | + + - 容器测试 + + 查看运行日志 + ``` + docker logs -f my-openresty + ``` + + 使用shell交互 + ``` + docker exec -it my-openresty /bin/bash + ``` + +license: 2-clause BSD license. +similar_packages: + - Nginx: 一款轻量级的Web服务器、反向代理服务器,由于它的内存占用少,启动极快,高并发能力强,在互联网项目中广泛应用。 + - Apache HTTP Server: 一个广泛使用的Web服务器软件,具有悠久的历史和广泛的应用。 + - Tomcat: 一个Java应用服务器,但它也提供了Web服务器的功能。 + - Caddy: 一个现代的Web服务器,具有简洁的配置和强大的功能。它支持自动HTTPS、HTTP/2、反向代理等,并且易于扩展和定制 +dependency: + - gcc + - make + - openssl-devel \ No newline at end of file diff --git a/openresty/doc/picture/logo.png b/openresty/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..60a8dfa7e41ebce9192719bae68f75f3e57e7d4a Binary files /dev/null and b/openresty/doc/picture/logo.png differ diff --git a/openresty/meta.yml b/openresty/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..e376a9d6c1fe2ad2e34463626fa267b641183648 --- /dev/null +++ b/openresty/meta.yml @@ -0,0 +1,2 @@ +1.21.4.1-oe2203sp3: + path: openresty/1.21.4.1/22.03-lts-sp3/Dockerfile \ No newline at end of file