Special Image Variants

In addition to the base OS flavors, docker-openresty provides several special variants that include extra tools or are built for specific purposes.

-fat Images

The -fat variants are built on top of their corresponding base images and include additional tools and packages useful for development and debugging.

For example, openresty/openresty:bookworm-fat is built from openresty/openresty:bookworm and adds:

  • openresty-opm: The OpenResty Package Manager.
  • openresty-resty: The resty command-line utility for running Lua scripts.
  • For source-built -fat images (e.g., alpine-fat), LuaRocks is also included.

These images are larger but save you the step of installing these common tools yourself.

Example Dockerfiles:

-slim Images

The -slim variant is currently available for alpine. It is identical to the standard alpine build-from-source flavor, but with an extra build step that strips the binaries of debugging symbols.

This results in a smaller image size, which can be beneficial for production deployments where minimizing disk and network usage is a priority.

This is enabled by setting the RESTY_STRIP_BINARIES build argument to a non-zero value during the build process.

-debug and -valgrind Images

For deep debugging and performance analysis, special OpenResty packages are available.

  • -debug: These images use the openresty-debug package, which is compiled with debugging symbols and without aggressive compiler optimizations. This is essential for use with tools like gdb.
  • -valgrind: These images use the openresty-valgrind package, which is built with support for the Valgrind instrumentation framework to detect memory management and threading bugs.

These variants are typically available for Debian-based upstream flavors like bullseye.

Example Dockerfiles: