openresty

Provides a high-performance web platform built on NGINX and LuaJIT, designed for dynamic content, routing, and API gateway workloads.

nginx
caddy
traefik
haproxy

What is openresty image?

The openresty image runs OpenResty, a full-featured web server framework that extends NGINX with LuaJIT scripting. It’s designed for building scalable web services, API gateways, reverse proxies, and dynamic routing systems — all without relying on external application servers.

OpenResty allows developers to run Lua code directly inside the NGINX event loop, enabling fast, event-driven handling of HTTP requests. It’s widely used for API composition, traffic shaping, caching, and authentication logic. In containerized infrastructure, OpenResty provides the flexibility of custom request handling with the performance of native NGINX, making it a popular choice for modern edge and gateway architectures.

How to use this image

The openresty image can be run directly as a reverse proxy or used as a base for custom Lua-driven web services. Configuration is done via NGINX-style config files, extended with Lua scripts for dynamic routing or data processing.

Run with a custom configuration:

docker run -d -p 8080:80 \ -v $(pwd)/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf \ openresty/openresty:1.25.3.2-0-alpine

Example nginx.conf:

worker_processes 1; events { worker_connections 1024; } http { server { listen 80; location / { content_by_lua_block { ngx.say("Hello from OpenResty!") } } } }

Use as a base image:

FROM openresty/openresty:1.25.3.2-0-alpine COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf

Logs are written to stdout and stderr, visible via docker logs. The default HTTP port is 80, and HTTPS can be configured using standard NGINX directives.

Image variants

Published under openresty/openresty, the image is available in multiple variants:

  • openresty/openresty:latest
    Tracks the most recent stable build.
    Use for testing or local experimentation.
  • openresty/openresty:<version>
    Tagged by release version (e.g. 1.25.3.2-0).
    Recommended for production to ensure compatibility and reproducibility.
  • openresty/openresty:<version>-alpine
    Lightweight Alpine Linux variant.
    Smaller footprint, ideal for production or CI pipelines.
  • openresty/openresty:<version>-centos / buster
    OS-specific variants aligned with enterprise environments.
    Useful for integration with system libraries or security standards.

OpenResty images are regularly updated with security patches and LuaJIT improvements. Pinning to a versioned tag ensures consistent runtime behavior across deployments.

Interested in base images that start and stay clean?

This is a not a valid email
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.