Multi-Architecture Support

docker-openresty provides images for multiple CPU architectures, allowing you to run OpenResty on a wide range of hardware, from standard cloud servers to ARM-based devices like the Raspberry Pi or AWS Graviton processors.

Supported Architectures

The primary supported architectures are:

  • amd64: The standard 64-bit architecture for Intel and AMD processors (also known as x86_64).
  • aarch64: The 64-bit ARM architecture (also known as arm64).
  • s390x: Supported for build-from-source Ubuntu flavors, targeting IBM Z systems.

How It Works: Docker Manifests

Docker supports multi-arch images through a feature called a "manifest list" (or manifest). A single image tag, like openresty/openresty:jammy, is actually a pointer to a list of image manifests, one for each supported architecture.

When you run docker pull openresty/openresty:jammy, the Docker daemon on your machine communicates with the registry, determines your machine's architecture, and pulls the correct image layer for that architecture automatically.

The creation of these manifests is automated in the project's CI/CD pipeline using the docker manifest command, as seen in the docker_manifest.sh script.

# Snippet from .travis.yml showing multi-arch manifest creation
- ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x

Architecture-Specific Tags

While you typically don't need to use them, architecture-specific tags are also pushed to the registry. For example:

  • openresty/openresty:jammy-amd64
  • openresty/openresty:jammy-aarch64

These can be useful for scenarios where you need to explicitly pull an image for a different architecture, such as in a cross-compilation build pipeline.

SSE 4.2 Optimizations (amd64)

For amd64 builds, OpenResty automatically detects and enables SSE 4.2 optimizations if the build machine supports them. This significantly improves performance for operations like CRC32 calculations. All official images on Docker Hub are built with these optimizations enabled.

If you need to run on very old hardware that lacks SSE 4.2 support, you must build a custom image from source and disable this feature via build arguments.