openresty/openrestyamzn2, (centos/Dockerfile with amzn2)bookworm-buildpack, (bookworm/Dockerfile.buildpack)bookworm-fat, (bookworm/Dockerfile.fat)bookworm, (bookworm/Dockerfile)bullseye-fat, (bullseye/Dockerfile.fat)bullseye, (bullseye/Dockerfile)centos, centos-rpm, (centos/Dockerfile with el8)centos7, (centos7/Dockerfile with el7)fedora, fedora-rpm, (fedora/Dockerfile with fc36)rocky, (fedora/Dockerfile with rockylinux)windows, (windows/Dockerfile)The following "flavors" are built from source and are intended for more advanced and custom usage, caveat emptor:
alpine-fat, (alpine/Dockerfile.fat)alpine, (alpine/Dockerfile)alpine-slim, (alpine/Dockerfile, stripped Alpine image)bionic, (bionic/Dockerfile)focal, (focal/Dockerfile)jammy, (jammy/Dockerfile)noble, (noble/Dockerfile)The openresty/openresty:latest tag points to the latest bookworm image.
Since 1.19.3.2-1, all flavors support multi-architecture builds, both amd64 and aarch64. Since 1.21.4.1-1, the s390x architecture is supported for build-from-source Ubuntu flavors (like jammy); prior to version 1.27.1.2-3, PCRE JIT is disabled for s390x.
Releases are tagged with <openresty-version>-<image-version>-<flavor>. The latest image-version will also be tagged <openresty-version>-<flavor>. The HEAD of the master branch is also labeled plainly as <flavor>. The builds are managed by Travis-CI and Appveyor (for Windows images).
There are architecture-specific tags as well, <openresty-version>-<image-version>-<flavor>-<arch>, but one would generally pull from the multi-architecture name above.
It is highly recommended that you use the upstream-based images for best support. For best stability, pin your images to the full tag, for example 1.21.4.1-0-bionic.
-fat images are ones that have LuaRocks and OPM installed in them. -buildpack images are based on buildpack-deps images; they might be useful when more build scaffolding is required in your application.
The Maintainers of this OpenResty Docker Tooling operate under the following policies:
We track OpenResty releases for build-from-upstream and will continue to add new upstream releases:
alpine-apk, (alpine-apk/Dockerfile)amzn2, (centos/Dockerfile with amzn2)bullseye-fat, (bullseye/Dockerfile.fat)bullseye, (bullseye/Dockerfile)centos, centos-rpm, (centos/Dockerfile with el8)centos7, (centos7/Dockerfile with el7)fedora, fedora-rpm, (fedora/Dockerfile with fc36)rocky, (fedora/Dockerfile with rockylinux)windows, (windows/Dockerfile)We track build-from-source images as follows:
stableWe try to include popular architectures (x86_64, aarch64, s390x)
RC versions of upstream releases will be made available on tags
If an image fails CI/CD too much, we will remove it.
We operate in English and PRs must be English as well, unless for localization purposes.
We will accept issues in any language. We will provide our translations to English for clarity.
All are welcome to particpate, but must show mutual respect to the community.
The Docker tooling installs its own nginx.conf file. If you want to directly override it, you can replace it in your own Dockerfile or via volume bind-mounting.
For the Linux images, that nginx.conf has the directive include /etc/nginx/conf.d/*.conf; so all nginx configurations in that directory will be included. The default virtual host configuration has the original OpenResty configuration and is copied to /etc/nginx/conf.d/default.conf.
Since 1.25.3.2-2, the nginx.conf also contains include /etc/nginx/conf.d/*.main; at the main stanza level (rather than the http level of *.conf). stream and other main level directives can be included there; see issue 257 for an example.
You can override that default.conf directly or volume bind-mount the /etc/nginx/conf.d directory to your own set of configurations:
docker run -v /my/custom/conf.d:/etc/nginx/conf.d openresty/openresty:alpine
If you are running on an selinux host (e.g. CentOS), you may need to add :Z to your volume bind-mount argument:
docker run -v /my/custom/conf.d:/etc/nginx/conf.d:Z openresty/openresty:alpine
When using the windows image you can change the main configuration directly:
docker run -v C:/my/custom/nginx.conf:C:/openresty/conf/nginx.conf openresty/openresty:windows
The image builds are labeled with various information, such as the versions of OpenResty and its dependent libraries. Here's an example of printing the labels using jq:
$ docker pull openresty/openresty:1.17.8.1-0-bionic $ docker inspect openresty/openresty:1.17.8.1-0-bionic | jq '.[].Config.Labels'
| Label Name | Description |
|---|---|
maintainer | Maintainer of the image |
resty_add_package_builddeps | buildarg RESTY_ADD_PACKAGE_BUILDDEPS |
resty_add_package_rundeps | buildarg RESTY_ADD_PACKAGE_RUNDEPS |
resty_apk_alpine_version | buildarg RESTY_APK_ALPINE_VERSION |
resty_apk_key_url | buildarg RESTY_APK_KEY_URL |
resty_apk_repo_url | buildarg RESTY_APK_REPO_URL |
resty_apk_version | buildarg RESTY_APK_VERSION |
resty_apt_pgp | buildarg RESTY_APT_PGP |
resty_apt_repo | buildarg RESTY_APT_REPO |
resty_apt_arch | buildarg RESTY_APT_ARCH |
resty_config_deps | buildarg _RESTY_CONFIG_DEPS (internal) |
resty_config_options_more | buildarg RESTY_CONFIG_OPTIONS_MORE |
resty_config_options | buildarg RESTY_CONFIG_OPTIONS |
resty_deb_flavor | buildarg RESTY_DEB_FLAVOR |
resty_deb_version | buildarg RESTY_DEB_VERSION (available versions) |
resty_eval_pre_make | buildarg RESTY_EVAL_PRE_MAKE |
resty_eval_post_make | buildarg RESTY_EVAL_POST_MAKE |
resty_eval_pre_configure | buildarg RESTY_EVAL_PRE_CONFIGURE |
resty_eval_post_download_pre_configure | buildarg RESTY_EVAL_POST_DOWNLOAD_PRE_CONFIGURE |
resty_fat_deb_flavor | buildarg RESTY_FAT_DEB_FLAVOR |
resty_fat_deb_version | buildarg RESTY_FAT_DEB_VERSION |
resty_fat_image_base | Name of the base image to build fat images from, buildarg RESTY_FAT_IMAGE_BASE |
resty_fat_image_tag | Tag of the base image to build fat images from, buildarg RESTY_FAT_IMAGE_TAG |
resty_image_base | Name of the base image to build from, buildarg RESTY_IMAGE_BASE |
resty_image_tag | Tag of the base image to build from, buildarg RESTY_IMAGE_TAG |
resty_install_base | buildarg RESTY_INSTALL_BASE |
resty_install_tag | buildarg RESTY_INSTALL_TAG |
resty_luajit_options | buildarg RESTY_LUAJIT_OPTIONS |
resty_luarocks_version | buildarg RESTY_LUAROCKS_VERSION |
resty_openssl_patch_version | buildarg RESTY_OPENSSL_PATCH_VERSION |
resty_openssl_url_base | buildarg RESTY_OPENSSL_URL_BASE |
resty_openssl_version | buildarg RESTY_OPENSSL_VERSION |
resty_openssl_build_options | buildarg RESTY_OPENSSL_BUILD_OPTIONS |
resty_pcre_build_options | buildarg RESTY_PCRE_BUILD_OPTIONS |
resty_pcre_options | buildarg RESTY_PCRE_OPTIONS |
resty_pcre_sha256 | buildarg RESTY_PCRE_SHA256 |
resty_pcre_version | buildarg RESTY_PCRE_VERSION |
resty_rpm_arch | buildarg RESTY_RPM_ARCH |
resty_rpm_dist | buildarg RESTY_RPM_DIST |
resty_rpm_flavor | buildarg RESTY_RPM_FLAVOR |
resty_rpm_version | buildarg RESTY_RPM_VERSION |
resty_strip_binaries | buildarg RESTY_STRIP_BINARIES |
resty_version | buildarg RESTY_VERSION |
resty_yum_repo | buildarg RESTY_YUM_REPO |
The -g "daemon off;" directive is used in the Dockerfile CMD to keep the Nginx daemon running after container creation. If this directive is added to the nginx.conf, then the docker run should explicitly invoke openresty (or nginx for windows images):
docker run [options] openresty/openresty:bionic openresty
Invoke another CMD, for example the resty utility, like so:
docker run [options] openresty/openresty:bionic resty [script.lua]
NOTE The alpine images do not include the packages perl and ncurses, which is needed by the resty utility.
You're very welcome to report bugs and give feedback as GitHub Issues:
[***]
Back to TOC
Back to TOC
docker-openresty is licensed under the 2-clause BSD license.
Copyright (c) 2017-2024, Evan Wies <***>.
This module is licensed under the terms of the BSD license.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Back to TOC
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务