From a9a5f6797a1360c6c7d97eed0c0e8132a199afc4 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Mon, 24 Nov 2025 22:58:17 -0800 Subject: [PATCH 01/12] Copy over bookworm/Dockerfile.buildpack --- trixie/Dockerfile.buildpack | 82 +++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 trixie/Dockerfile.buildpack diff --git a/trixie/Dockerfile.buildpack b/trixie/Dockerfile.buildpack new file mode 100644 index 0000000..98092d4 --- /dev/null +++ b/trixie/Dockerfile.buildpack @@ -0,0 +1,82 @@ +# Dockerfile - buildpack-deps +# https://github.com/openresty/docker-openresty + +ARG RESTY_IMAGE_BASE="buildpack-deps" +ARG RESTY_IMAGE_TAG="bookworm" + +FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} + +LABEL maintainer="Evan Wies " + +# RESTY_DEB_FLAVOR build argument is used to select other +# OpenResty Debian package variants. +# For example: "-debug" or "-valgrind" +ARG RESTY_DEB_FLAVOR="" +ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" +ARG RESTY_APT_REPO="https://openresty.org/package/debian" +ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" +ARG RESTY_APT_ARCH="amd64" +ARG RESTY_IMAGE_BASE="buildpack-deps" +ARG RESTY_IMAGE_TAG="bookworm" + +ARG RESTY_LUAROCKS_VERSION="3.12.2" + +LABEL resty_image_base="${RESTY_IMAGE_BASE}" +LABEL resty_image_tag="${RESTY_IMAGE_TAG}" +LABEL resty_apt_repo="${RESTY_APT_REPO}" +LABEL resty_apt_pgp="${RESTY_APT_PGP}" +LABEL resty_apt_arch="${RESTY_APT_ARCH}" +LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" +LABEL resty_deb_version="${RESTY_DEB_VERSION}" +LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}}" + +# Install OpenResty +RUN wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && echo "deb [arch=$RESTY_APT_ARCH signed-by=/etc/apt/trusted.gpg.d/openresty-keyring.gpg] $RESTY_APT_REPO $(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) openresty" | tee /etc/apt/sources.list.d/openresty.list \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + openresty-resty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + openresty-opm${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + openresty-openssl3${RESTY_DEB_FLAVOR}-dev \ + openresty-pcre2${RESTY_DEB_FLAVOR}-dev \ + openresty-zlib${RESTY_DEB_FLAVOR}-dev \ + && mkdir -p /var/run/openresty \ + && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ + && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log + +# Install LuaRocks +RUN curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ + && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ + && cd luarocks-${RESTY_LUAROCKS_VERSION} \ + && ./configure \ + --prefix=/usr/local/openresty/luajit \ + --with-lua=/usr/local/openresty/luajit \ + --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ + && make build \ + && make install \ + && cd /tmp \ + && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz + +# Add additional binaries into PATH for convenience +ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" + +# Add LuaRocks paths +# If OpenResty changes, these may need updating: +# /usr/local/openresty/bin/resty -e 'print(package.path)' +# /usr/local/openresty/bin/resty -e 'print(package.cpath)' +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/?.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" + +# Copy nginx configuration files +COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf +COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf + +CMD ["/usr/bin/openresty", "-g", "daemon off;"] + +# Use SIGQUIT instead of default SIGTERM to cleanly drain requests +# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls +STOPSIGNAL SIGQUIT From 67e228c80d8ffcf74c4e93166926abce4e4bc972 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Mon, 24 Nov 2025 23:00:04 -0800 Subject: [PATCH 02/12] Add a Dockerfile.buildpack file for Debian Trixie --- trixie/Dockerfile.buildpack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trixie/Dockerfile.buildpack b/trixie/Dockerfile.buildpack index 98092d4..61a4562 100644 --- a/trixie/Dockerfile.buildpack +++ b/trixie/Dockerfile.buildpack @@ -2,7 +2,7 @@ # https://github.com/openresty/docker-openresty ARG RESTY_IMAGE_BASE="buildpack-deps" -ARG RESTY_IMAGE_TAG="bookworm" +ARG RESTY_IMAGE_TAG="trixie" FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} @@ -35,7 +35,7 @@ RUN wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openres && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && echo "deb [arch=$RESTY_APT_ARCH signed-by=/etc/apt/trusted.gpg.d/openresty-keyring.gpg] $RESTY_APT_REPO $(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release) openresty" | tee /etc/apt/sources.list.d/openresty.list \ + && echo "\nTypes: deb\nURIs: $RESTY_APT_REPO\nSuites: $RESTY_IMAGE_TAG\nComponents: openresty\nEnabled: yes\nArchitectures: $RESTY_APT_ARCH\nSigned-By: /etc/apt/trusted.gpg.d/openresty-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources \ && DEBIAN_FRONTEND=noninteractive apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ From bf0935ae9bb700e6352dbfbf01b1ff8d0251f771 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Mon, 24 Nov 2025 23:08:24 -0800 Subject: [PATCH 03/12] Add a Dockerfile for Debian Trixie --- trixie/Dockerfile | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 trixie/Dockerfile diff --git a/trixie/Dockerfile b/trixie/Dockerfile new file mode 100644 index 0000000..2dbc71f --- /dev/null +++ b/trixie/Dockerfile @@ -0,0 +1,65 @@ +# Dockerfile - Debian 12 Bookworm - DEB version +# https://github.com/openresty/docker-openresty + +ARG RESTY_IMAGE_BASE="debian" +ARG RESTY_IMAGE_TAG="trixie-slim" + +FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} + +LABEL maintainer="Evan Wies " + +# RESTY_DEB_FLAVOR build argument is used to select other +# OpenResty Debian package variants. +# For example: "-debug" or "-valgrind" +ARG RESTY_DEB_FLAVOR="" +ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" +ARG RESTY_APT_REPO="https://openresty.org/package/debian" +ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" +ARG RESTY_APT_ARCH="amd64" +ARG RESTY_IMAGE_BASE="debian" +ARG RESTY_IMAGE_TAG="bookworm-slim" + +LABEL resty_image_base="${RESTY_IMAGE_BASE}" +LABEL resty_image_tag="${RESTY_IMAGE_TAG}" +LABEL resty_apt_repo="${RESTY_APT_REPO}" +LABEL resty_apt_pgp="${RESTY_APT_PGP}" +LABEL resty_apt_arch="${RESTY_APT_ARCH}" +LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" +LABEL resty_deb_version="${RESTY_DEB_VERSION}" + + +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates \ + gettext-base \ + gnupg \ + wget \ + && wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && echo "\nTypes: deb\nURIs: $RESTY_APT_REPO\nSuites: $RESTY_IMAGE_TAG\nComponents: openresty\nEnabled: yes\nArchitectures: $RESTY_APT_ARCH\nSigned-By: /etc/apt/trusted.gpg.d/openresty-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources \ + && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ + gnupg \ + wget \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /var/run/openresty \ + && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ + && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log + +# Add additional binaries into PATH for convenience +ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" + +# Copy nginx configuration files +COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf +COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf + +CMD ["/usr/bin/openresty", "-g", "daemon off;"] + +# Use SIGQUIT instead of default SIGTERM to cleanly drain requests +# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls +STOPSIGNAL SIGQUIT From 170e9b79ae7945afcf3b3f7b5afe0a922de89a70 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Mon, 24 Nov 2025 23:13:38 -0800 Subject: [PATCH 04/12] Update Trixie Dockerfile header --- trixie/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trixie/Dockerfile b/trixie/Dockerfile index 2dbc71f..a0e18e8 100644 --- a/trixie/Dockerfile +++ b/trixie/Dockerfile @@ -1,4 +1,4 @@ -# Dockerfile - Debian 12 Bookworm - DEB version +# Dockerfile - Debian 13 Trixie - DEB version # https://github.com/openresty/docker-openresty ARG RESTY_IMAGE_BASE="debian" From b06600837a13535cf9e5fab2b4dca20f5884337d Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 12:12:00 -0800 Subject: [PATCH 05/12] Copy Dockerfile.fat from bookworm to trixie --- trixie/Dockerfile.fat | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 trixie/Dockerfile.fat diff --git a/trixie/Dockerfile.fat b/trixie/Dockerfile.fat new file mode 100644 index 0000000..068933c --- /dev/null +++ b/trixie/Dockerfile.fat @@ -0,0 +1,34 @@ +# Dockerfile - Debian 12 Bookworm Fat - DEB version +# https://github.com/openresty/docker-openresty +# +# This builds upon the base OpenResty Bookworm image, +# adding useful packages and utilities. +# +# Currently it just adds the openresty-opm package. +# + +ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" +ARG RESTY_FAT_IMAGE_TAG="bookworm" + +FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} + +ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" +ARG RESTY_FAT_IMAGE_TAG="bookworm" + +# RESTY_FAT_DEB_FLAVOR build argument is used to select other +# OpenResty Debian package variants. +# For example: "-debug" or "-valgrind" +ARG RESTY_FAT_DEB_FLAVOR="" +ARG RESTY_FAT_DEB_VERSION="=1.27.1.2-1~bookworm1" + +LABEL maintainer="Evan Wies " +LABEL resty_fat_deb_flavor="${RESTY_FAT_DEB_FLAVOR}" +LABEL resty_fat_deb_version="${RESTY_FAT_DEB_VERSION}" +LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" +LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" + +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openresty-resty${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ + openresty-opm${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ + && rm -rf /var/lib/apt/lists/* From 81ecdda9c23f74820866e685785230e26d90c54c Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 12:16:50 -0800 Subject: [PATCH 06/12] Update trixie/Dockerfile.fat for Debian Trixie --- trixie/Dockerfile.fat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trixie/Dockerfile.fat b/trixie/Dockerfile.fat index 068933c..80ec18e 100644 --- a/trixie/Dockerfile.fat +++ b/trixie/Dockerfile.fat @@ -1,14 +1,14 @@ -# Dockerfile - Debian 12 Bookworm Fat - DEB version +# Dockerfile - Debian 13 Trixie Fat - DEB version # https://github.com/openresty/docker-openresty # -# This builds upon the base OpenResty Bookworm image, +# This builds upon the base OpenResty Trixie image, # adding useful packages and utilities. # # Currently it just adds the openresty-opm package. # ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" -ARG RESTY_FAT_IMAGE_TAG="bookworm" +ARG RESTY_FAT_IMAGE_TAG="trixie" FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} From 0abd72625d11f00b5fcc7eed75081f542df4fd24 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 12:22:56 -0800 Subject: [PATCH 07/12] Add Debian Trixie build commands to Taskfile.yml --- Taskfile.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 74962da..58e3ca1 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,4 +1,4 @@ -# https://taskfile.dev/installation +# https://taskfile.dev/installation version: '3' @@ -6,7 +6,7 @@ tasks: default: cmds: - task --list-all - + build-all-arm64: deps: - build-all-upstream-arm64 @@ -27,6 +27,7 @@ tasks: - docker build -t centos-aarch64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - docker build -t centos7-aarch64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - docker build -t fedora-aarch64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . + - docker build -t trixie-aarch64 -f trixie/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . - docker build -t bookworm-aarch64 -f bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . - docker build -t bullseye-aarch64 -f bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" . @@ -38,6 +39,7 @@ tasks: - docker build -t centos-amd64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - docker build -t centos7-amd64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - docker build -t fedora-amd64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . + - docker build -t trixie-amd64 -f trixie/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . - docker build -t bookworm-amd64 -f bookworm/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . - docker build -t bullseye-amd64 -f bullseye/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . From 27208b3aaac9696666d53cbc0615d1590b579ca1 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 12:34:16 -0800 Subject: [PATCH 08/12] Add Debian Trixie build commands to .travis.yml --- .travis.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a3c9f8e..a21199a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,6 +160,8 @@ jobs: - ./docker_build_and_push_flavor.sh centos-aarch64 centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - ./docker_build_and_push_flavor.sh centos7-aarch64 centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - ./docker_build_and_push_flavor.sh fedora-aarch64 fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 + - ./docker_build_and_push_flavor.sh trixie-aarch64 trixie/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" + - ./docker_build_and_push_flavor.sh trixie-buildpack-aarch64 trixie/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bookworm-aarch64 bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bookworm-buildpack-aarch64 bookworm/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bullseye-aarch64 bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" @@ -176,6 +178,8 @@ jobs: - ./docker_build_and_push_flavor.sh centos-amd64 centos/Dockerfile - ./docker_build_and_push_flavor.sh centos7-amd64 centos7/Dockerfile - ./docker_build_and_push_flavor.sh fedora-amd64 fedora/Dockerfile + - ./docker_build_and_push_flavor.sh trixie-amd64 trixie/Dockerfile + - ./docker_build_and_push_flavor.sh trixie-buildpack-amd64 trixie/Dockerfile.buildpack - ./docker_build_and_push_flavor.sh bookworm-amd64 bookworm/Dockerfile - ./docker_build_and_push_flavor.sh bookworm-buildpack-amd64 bookworm/Dockerfile.buildpack - ./docker_build_and_push_flavor.sh bullseye-amd64 bullseye/Dockerfile @@ -186,7 +190,7 @@ jobs: # Multi-arch manifests ############################################################################### - # also master bookworm gets tagged "latest" + # also master trixie gets tagged "latest" - name: Create and push manifests for multi-arch images stage: manifest script: @@ -207,12 +211,14 @@ jobs: - ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x - ./docker_manifest.sh noble noble-amd64 noble-aarch64 noble-s390x - ./docker_manifest.sh rocky rocky-amd64 rocky-aarch64 + - ./docker_manifest.sh trixie trixie-amd64 trixie-aarch64 + - ./docker_manifest.sh trixie-buildpack trixie-buildpack-amd64 trixie-buildpack-aarch64 - ./docker_tag_alias.sh centos centos-rpm - ./docker_tag_alias.sh fedora fedora-rpm - if [[ "$TRAVIS_BRANCH" == "master" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin && - docker pull $DOCKER_ORG/openresty:bookworm && - docker tag $DOCKER_ORG/openresty:bookworm $DOCKER_ORG/openresty:latest && + docker pull $DOCKER_ORG/openresty:trixie && + docker tag $DOCKER_ORG/openresty:trixie $DOCKER_ORG/openresty:latest && docker push $DOCKER_ORG/openresty:latest ; fi @@ -225,6 +231,7 @@ jobs: stage: build-fat arch: arm64 script: + - ./docker_build_and_push_flavor_fat.sh trixie-fat-aarch64 trixie/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bookworm-fat-aarch64 bookworm/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bullseye-fat-aarch64 bullseye/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh alpine-fat-aarch64 alpine/Dockerfile.fat @@ -233,6 +240,7 @@ jobs: arch: amd64 stage: build-fat script: + - ./docker_build_and_push_flavor_fat.sh trixie-fat-amd64 trixie/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bookworm-fat-amd64 bookworm/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bullseye-fat-amd64 bullseye/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh alpine-fat-amd64 alpine/Dockerfile.fat @@ -240,6 +248,7 @@ jobs: - name: Create and push manifests for fat multi-arch images stage: manifest-fat script: + - ./docker_manifest.sh trixie-fat trixie-fat-amd64 trixie-fat-aarch64 - ./docker_manifest.sh bookworm-fat bookworm-fat-amd64 bookworm-fat-aarch64 - ./docker_manifest.sh bullseye-fat bullseye-fat-amd64 bullseye-fat-aarch64 - ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64 From ae8de0819f42dbe43525484d6b96eb784bead5d5 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 12:43:10 -0800 Subject: [PATCH 09/12] Add Debian Trixie flavor to README.md --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfad0a5..4bc023f 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,9 @@ The following "flavors" are available and built from [upstream OpenResty package - [`centos7`, (*centos7/Dockerfile* with `el7`)](https://github.com/openresty/docker-openresty/blob/master/centos7/Dockerfile) - [`fedora`, `fedora-rpm`, (*fedora/Dockerfile* with `fc36`)](https://github.com/openresty/docker-openresty/blob/master/fedora/Dockerfile) - [`rocky`, (*fedora/Dockerfile* with `rockylinux`)](https://github.com/openresty/docker-openresty/blob/master/fedora/Dockerfile) +- [`trixie-buildpack`, (*trixie/Dockerfile.buildpack*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile.buildpack) +- [`trixie-fat`, (*trixie/Dockerfile.fat*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile.fat) +- [`trixie`, (*trixie/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile) - [`windows`, (*windows/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/windows/Dockerfile) The following "flavors" are built from source and are intended for more advanced and custom usage, caveat emptor: @@ -115,7 +118,7 @@ The following "flavors" are built from source and are intended for more advanced - [`jammy`, (*jammy/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/jammy/Dockerfile) - [`noble`, (*noble/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/noble/Dockerfile) -The `openresty/openresty:latest` tag points to the latest `bookworm` image. +The `openresty/openresty:latest` tag points to the latest `trixie` 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](https://github.com/zherczeg/sljit/issues/89) is disabled for `s390x`. @@ -195,7 +198,7 @@ OPM Starting at version 1.11.2.2, OpenResty for Linux includes a [package manager called `opm`](https://github.com/openresty/opm#readme), which can be found at `/usr/local/openresty/bin/opm`. -`opm` is built in all the images except `alpine` and `bullseye` and `bookworm`. +`opm` is built in all the images except `alpine` and `bullseye` and `bookworm` and `trixie`. To use `opm` in the `alpine` image, you must also install the `curl` and `perl` packages; they are not included by default because they double the image size. You may install them like so: `apk add --no-cache curl perl`. From 56ebb85856048f0cd5df904e04b69ed841c67330 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 12:49:23 -0800 Subject: [PATCH 10/12] Add Debian Trixie to 'DEB-based' list in BUILDING.md --- BUILDING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILDING.md b/BUILDING.md index 46cede8..4e9c0b0 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -144,6 +144,7 @@ You can derive your own Docker images from this to install your own packages. S This Docker image can be built and customized by cloning the repo and running `docker build` with the desired Dockerfile: + * [Debian Trixie 13 DEB](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile) (`trixie/Dockerfile`) * [Debian Bookworm 12 DEB](https://github.com/openresty/docker-openresty/blob/master/bookworm/Dockerfile) (`bookworm/Dockerfile`) * [Debian Bullseye 11 DEB](https://github.com/openresty/docker-openresty/blob/master/bullseye/Dockerfile) (`bullseye/Dockerfile`) From 99f30c5a1cc0a1c06d8720c7c3947af13e0522ec Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 14:58:03 -0800 Subject: [PATCH 11/12] Revert commits to fix author email --- .travis.yml | 15 ++----- BUILDING.md | 1 - README.md | 7 +--- Taskfile.yml | 6 +-- trixie/Dockerfile | 65 ----------------------------- trixie/Dockerfile.buildpack | 82 ------------------------------------- trixie/Dockerfile.fat | 34 --------------- 7 files changed, 7 insertions(+), 203 deletions(-) delete mode 100644 trixie/Dockerfile delete mode 100644 trixie/Dockerfile.buildpack delete mode 100644 trixie/Dockerfile.fat diff --git a/.travis.yml b/.travis.yml index a21199a..a3c9f8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,8 +160,6 @@ jobs: - ./docker_build_and_push_flavor.sh centos-aarch64 centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - ./docker_build_and_push_flavor.sh centos7-aarch64 centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - ./docker_build_and_push_flavor.sh fedora-aarch64 fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - - ./docker_build_and_push_flavor.sh trixie-aarch64 trixie/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - - ./docker_build_and_push_flavor.sh trixie-buildpack-aarch64 trixie/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bookworm-aarch64 bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bookworm-buildpack-aarch64 bookworm/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bullseye-aarch64 bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" @@ -178,8 +176,6 @@ jobs: - ./docker_build_and_push_flavor.sh centos-amd64 centos/Dockerfile - ./docker_build_and_push_flavor.sh centos7-amd64 centos7/Dockerfile - ./docker_build_and_push_flavor.sh fedora-amd64 fedora/Dockerfile - - ./docker_build_and_push_flavor.sh trixie-amd64 trixie/Dockerfile - - ./docker_build_and_push_flavor.sh trixie-buildpack-amd64 trixie/Dockerfile.buildpack - ./docker_build_and_push_flavor.sh bookworm-amd64 bookworm/Dockerfile - ./docker_build_and_push_flavor.sh bookworm-buildpack-amd64 bookworm/Dockerfile.buildpack - ./docker_build_and_push_flavor.sh bullseye-amd64 bullseye/Dockerfile @@ -190,7 +186,7 @@ jobs: # Multi-arch manifests ############################################################################### - # also master trixie gets tagged "latest" + # also master bookworm gets tagged "latest" - name: Create and push manifests for multi-arch images stage: manifest script: @@ -211,14 +207,12 @@ jobs: - ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x - ./docker_manifest.sh noble noble-amd64 noble-aarch64 noble-s390x - ./docker_manifest.sh rocky rocky-amd64 rocky-aarch64 - - ./docker_manifest.sh trixie trixie-amd64 trixie-aarch64 - - ./docker_manifest.sh trixie-buildpack trixie-buildpack-amd64 trixie-buildpack-aarch64 - ./docker_tag_alias.sh centos centos-rpm - ./docker_tag_alias.sh fedora fedora-rpm - if [[ "$TRAVIS_BRANCH" == "master" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin && - docker pull $DOCKER_ORG/openresty:trixie && - docker tag $DOCKER_ORG/openresty:trixie $DOCKER_ORG/openresty:latest && + docker pull $DOCKER_ORG/openresty:bookworm && + docker tag $DOCKER_ORG/openresty:bookworm $DOCKER_ORG/openresty:latest && docker push $DOCKER_ORG/openresty:latest ; fi @@ -231,7 +225,6 @@ jobs: stage: build-fat arch: arm64 script: - - ./docker_build_and_push_flavor_fat.sh trixie-fat-aarch64 trixie/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bookworm-fat-aarch64 bookworm/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bullseye-fat-aarch64 bullseye/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh alpine-fat-aarch64 alpine/Dockerfile.fat @@ -240,7 +233,6 @@ jobs: arch: amd64 stage: build-fat script: - - ./docker_build_and_push_flavor_fat.sh trixie-fat-amd64 trixie/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bookworm-fat-amd64 bookworm/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bullseye-fat-amd64 bullseye/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh alpine-fat-amd64 alpine/Dockerfile.fat @@ -248,7 +240,6 @@ jobs: - name: Create and push manifests for fat multi-arch images stage: manifest-fat script: - - ./docker_manifest.sh trixie-fat trixie-fat-amd64 trixie-fat-aarch64 - ./docker_manifest.sh bookworm-fat bookworm-fat-amd64 bookworm-fat-aarch64 - ./docker_manifest.sh bullseye-fat bullseye-fat-amd64 bullseye-fat-aarch64 - ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64 diff --git a/BUILDING.md b/BUILDING.md index 4e9c0b0..46cede8 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -144,7 +144,6 @@ You can derive your own Docker images from this to install your own packages. S This Docker image can be built and customized by cloning the repo and running `docker build` with the desired Dockerfile: - * [Debian Trixie 13 DEB](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile) (`trixie/Dockerfile`) * [Debian Bookworm 12 DEB](https://github.com/openresty/docker-openresty/blob/master/bookworm/Dockerfile) (`bookworm/Dockerfile`) * [Debian Bullseye 11 DEB](https://github.com/openresty/docker-openresty/blob/master/bullseye/Dockerfile) (`bullseye/Dockerfile`) diff --git a/README.md b/README.md index 4bc023f..dfad0a5 100644 --- a/README.md +++ b/README.md @@ -103,9 +103,6 @@ The following "flavors" are available and built from [upstream OpenResty package - [`centos7`, (*centos7/Dockerfile* with `el7`)](https://github.com/openresty/docker-openresty/blob/master/centos7/Dockerfile) - [`fedora`, `fedora-rpm`, (*fedora/Dockerfile* with `fc36`)](https://github.com/openresty/docker-openresty/blob/master/fedora/Dockerfile) - [`rocky`, (*fedora/Dockerfile* with `rockylinux`)](https://github.com/openresty/docker-openresty/blob/master/fedora/Dockerfile) -- [`trixie-buildpack`, (*trixie/Dockerfile.buildpack*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile.buildpack) -- [`trixie-fat`, (*trixie/Dockerfile.fat*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile.fat) -- [`trixie`, (*trixie/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile) - [`windows`, (*windows/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/windows/Dockerfile) The following "flavors" are built from source and are intended for more advanced and custom usage, caveat emptor: @@ -118,7 +115,7 @@ The following "flavors" are built from source and are intended for more advanced - [`jammy`, (*jammy/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/jammy/Dockerfile) - [`noble`, (*noble/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/noble/Dockerfile) -The `openresty/openresty:latest` tag points to the latest `trixie` image. +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](https://github.com/zherczeg/sljit/issues/89) is disabled for `s390x`. @@ -198,7 +195,7 @@ OPM Starting at version 1.11.2.2, OpenResty for Linux includes a [package manager called `opm`](https://github.com/openresty/opm#readme), which can be found at `/usr/local/openresty/bin/opm`. -`opm` is built in all the images except `alpine` and `bullseye` and `bookworm` and `trixie`. +`opm` is built in all the images except `alpine` and `bullseye` and `bookworm`. To use `opm` in the `alpine` image, you must also install the `curl` and `perl` packages; they are not included by default because they double the image size. You may install them like so: `apk add --no-cache curl perl`. diff --git a/Taskfile.yml b/Taskfile.yml index 58e3ca1..74962da 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,4 +1,4 @@ -# https://taskfile.dev/installation +# https://taskfile.dev/installation version: '3' @@ -6,7 +6,7 @@ tasks: default: cmds: - task --list-all - + build-all-arm64: deps: - build-all-upstream-arm64 @@ -27,7 +27,6 @@ tasks: - docker build -t centos-aarch64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - docker build -t centos7-aarch64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - docker build -t fedora-aarch64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - - docker build -t trixie-aarch64 -f trixie/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . - docker build -t bookworm-aarch64 -f bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . - docker build -t bullseye-aarch64 -f bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" . @@ -39,7 +38,6 @@ tasks: - docker build -t centos-amd64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - docker build -t centos7-amd64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - docker build -t fedora-amd64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - - docker build -t trixie-amd64 -f trixie/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . - docker build -t bookworm-amd64 -f bookworm/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . - docker build -t bullseye-amd64 -f bullseye/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . diff --git a/trixie/Dockerfile b/trixie/Dockerfile deleted file mode 100644 index a0e18e8..0000000 --- a/trixie/Dockerfile +++ /dev/null @@ -1,65 +0,0 @@ -# Dockerfile - Debian 13 Trixie - DEB version -# https://github.com/openresty/docker-openresty - -ARG RESTY_IMAGE_BASE="debian" -ARG RESTY_IMAGE_TAG="trixie-slim" - -FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} - -LABEL maintainer="Evan Wies " - -# RESTY_DEB_FLAVOR build argument is used to select other -# OpenResty Debian package variants. -# For example: "-debug" or "-valgrind" -ARG RESTY_DEB_FLAVOR="" -ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" -ARG RESTY_APT_REPO="https://openresty.org/package/debian" -ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" -ARG RESTY_APT_ARCH="amd64" -ARG RESTY_IMAGE_BASE="debian" -ARG RESTY_IMAGE_TAG="bookworm-slim" - -LABEL resty_image_base="${RESTY_IMAGE_BASE}" -LABEL resty_image_tag="${RESTY_IMAGE_TAG}" -LABEL resty_apt_repo="${RESTY_APT_REPO}" -LABEL resty_apt_pgp="${RESTY_APT_PGP}" -LABEL resty_apt_arch="${RESTY_APT_ARCH}" -LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" -LABEL resty_deb_version="${RESTY_DEB_VERSION}" - - -RUN DEBIAN_FRONTEND=noninteractive apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - ca-certificates \ - gettext-base \ - gnupg \ - wget \ - && wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && echo "\nTypes: deb\nURIs: $RESTY_APT_REPO\nSuites: $RESTY_IMAGE_TAG\nComponents: openresty\nEnabled: yes\nArchitectures: $RESTY_APT_ARCH\nSigned-By: /etc/apt/trusted.gpg.d/openresty-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources \ - && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ - gnupg \ - wget \ - && DEBIAN_FRONTEND=noninteractive apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ - && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /var/run/openresty \ - && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ - && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log - -# Add additional binaries into PATH for convenience -ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" - -# Copy nginx configuration files -COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf -COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf - -CMD ["/usr/bin/openresty", "-g", "daemon off;"] - -# Use SIGQUIT instead of default SIGTERM to cleanly drain requests -# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls -STOPSIGNAL SIGQUIT diff --git a/trixie/Dockerfile.buildpack b/trixie/Dockerfile.buildpack deleted file mode 100644 index 61a4562..0000000 --- a/trixie/Dockerfile.buildpack +++ /dev/null @@ -1,82 +0,0 @@ -# Dockerfile - buildpack-deps -# https://github.com/openresty/docker-openresty - -ARG RESTY_IMAGE_BASE="buildpack-deps" -ARG RESTY_IMAGE_TAG="trixie" - -FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} - -LABEL maintainer="Evan Wies " - -# RESTY_DEB_FLAVOR build argument is used to select other -# OpenResty Debian package variants. -# For example: "-debug" or "-valgrind" -ARG RESTY_DEB_FLAVOR="" -ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" -ARG RESTY_APT_REPO="https://openresty.org/package/debian" -ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" -ARG RESTY_APT_ARCH="amd64" -ARG RESTY_IMAGE_BASE="buildpack-deps" -ARG RESTY_IMAGE_TAG="bookworm" - -ARG RESTY_LUAROCKS_VERSION="3.12.2" - -LABEL resty_image_base="${RESTY_IMAGE_BASE}" -LABEL resty_image_tag="${RESTY_IMAGE_TAG}" -LABEL resty_apt_repo="${RESTY_APT_REPO}" -LABEL resty_apt_pgp="${RESTY_APT_PGP}" -LABEL resty_apt_arch="${RESTY_APT_ARCH}" -LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" -LABEL resty_deb_version="${RESTY_DEB_VERSION}" -LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}}" - -# Install OpenResty -RUN wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ - && echo "\nTypes: deb\nURIs: $RESTY_APT_REPO\nSuites: $RESTY_IMAGE_TAG\nComponents: openresty\nEnabled: yes\nArchitectures: $RESTY_APT_ARCH\nSigned-By: /etc/apt/trusted.gpg.d/openresty-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources \ - && DEBIAN_FRONTEND=noninteractive apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ - openresty-resty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ - openresty-opm${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ - openresty-openssl3${RESTY_DEB_FLAVOR}-dev \ - openresty-pcre2${RESTY_DEB_FLAVOR}-dev \ - openresty-zlib${RESTY_DEB_FLAVOR}-dev \ - && mkdir -p /var/run/openresty \ - && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ - && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log - -# Install LuaRocks -RUN curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ - && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ - && cd luarocks-${RESTY_LUAROCKS_VERSION} \ - && ./configure \ - --prefix=/usr/local/openresty/luajit \ - --with-lua=/usr/local/openresty/luajit \ - --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ - && make build \ - && make install \ - && cd /tmp \ - && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz - -# Add additional binaries into PATH for convenience -ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" - -# Add LuaRocks paths -# If OpenResty changes, these may need updating: -# /usr/local/openresty/bin/resty -e 'print(package.path)' -# /usr/local/openresty/bin/resty -e 'print(package.cpath)' -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/?.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" - -# Copy nginx configuration files -COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf -COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf - -CMD ["/usr/bin/openresty", "-g", "daemon off;"] - -# Use SIGQUIT instead of default SIGTERM to cleanly drain requests -# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls -STOPSIGNAL SIGQUIT diff --git a/trixie/Dockerfile.fat b/trixie/Dockerfile.fat deleted file mode 100644 index 80ec18e..0000000 --- a/trixie/Dockerfile.fat +++ /dev/null @@ -1,34 +0,0 @@ -# Dockerfile - Debian 13 Trixie Fat - DEB version -# https://github.com/openresty/docker-openresty -# -# This builds upon the base OpenResty Trixie image, -# adding useful packages and utilities. -# -# Currently it just adds the openresty-opm package. -# - -ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" -ARG RESTY_FAT_IMAGE_TAG="trixie" - -FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} - -ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" -ARG RESTY_FAT_IMAGE_TAG="bookworm" - -# RESTY_FAT_DEB_FLAVOR build argument is used to select other -# OpenResty Debian package variants. -# For example: "-debug" or "-valgrind" -ARG RESTY_FAT_DEB_FLAVOR="" -ARG RESTY_FAT_DEB_VERSION="=1.27.1.2-1~bookworm1" - -LABEL maintainer="Evan Wies " -LABEL resty_fat_deb_flavor="${RESTY_FAT_DEB_FLAVOR}" -LABEL resty_fat_deb_version="${RESTY_FAT_DEB_VERSION}" -LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" -LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" - -RUN DEBIAN_FRONTEND=noninteractive apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - openresty-resty${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ - openresty-opm${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ - && rm -rf /var/lib/apt/lists/* From b2f3b9eb599afca57600c45e6e293eb53f2ed7d5 Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Tue, 25 Nov 2025 14:58:57 -0800 Subject: [PATCH 12/12] Revert "Revert commits to fix author email" This reverts commit 99f30c5a1cc0a1c06d8720c7c3947af13e0522ec. --- .travis.yml | 15 +++++-- BUILDING.md | 1 + README.md | 7 +++- Taskfile.yml | 6 ++- trixie/Dockerfile | 65 +++++++++++++++++++++++++++++ trixie/Dockerfile.buildpack | 82 +++++++++++++++++++++++++++++++++++++ trixie/Dockerfile.fat | 34 +++++++++++++++ 7 files changed, 203 insertions(+), 7 deletions(-) create mode 100644 trixie/Dockerfile create mode 100644 trixie/Dockerfile.buildpack create mode 100644 trixie/Dockerfile.fat diff --git a/.travis.yml b/.travis.yml index a3c9f8e..a21199a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -160,6 +160,8 @@ jobs: - ./docker_build_and_push_flavor.sh centos-aarch64 centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - ./docker_build_and_push_flavor.sh centos7-aarch64 centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 - ./docker_build_and_push_flavor.sh fedora-aarch64 fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 + - ./docker_build_and_push_flavor.sh trixie-aarch64 trixie/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" + - ./docker_build_and_push_flavor.sh trixie-buildpack-aarch64 trixie/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bookworm-aarch64 bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bookworm-buildpack-aarch64 bookworm/Dockerfile.buildpack --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" - ./docker_build_and_push_flavor.sh bullseye-aarch64 bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" @@ -176,6 +178,8 @@ jobs: - ./docker_build_and_push_flavor.sh centos-amd64 centos/Dockerfile - ./docker_build_and_push_flavor.sh centos7-amd64 centos7/Dockerfile - ./docker_build_and_push_flavor.sh fedora-amd64 fedora/Dockerfile + - ./docker_build_and_push_flavor.sh trixie-amd64 trixie/Dockerfile + - ./docker_build_and_push_flavor.sh trixie-buildpack-amd64 trixie/Dockerfile.buildpack - ./docker_build_and_push_flavor.sh bookworm-amd64 bookworm/Dockerfile - ./docker_build_and_push_flavor.sh bookworm-buildpack-amd64 bookworm/Dockerfile.buildpack - ./docker_build_and_push_flavor.sh bullseye-amd64 bullseye/Dockerfile @@ -186,7 +190,7 @@ jobs: # Multi-arch manifests ############################################################################### - # also master bookworm gets tagged "latest" + # also master trixie gets tagged "latest" - name: Create and push manifests for multi-arch images stage: manifest script: @@ -207,12 +211,14 @@ jobs: - ./docker_manifest.sh jammy jammy-amd64 jammy-aarch64 jammy-s390x - ./docker_manifest.sh noble noble-amd64 noble-aarch64 noble-s390x - ./docker_manifest.sh rocky rocky-amd64 rocky-aarch64 + - ./docker_manifest.sh trixie trixie-amd64 trixie-aarch64 + - ./docker_manifest.sh trixie-buildpack trixie-buildpack-amd64 trixie-buildpack-aarch64 - ./docker_tag_alias.sh centos centos-rpm - ./docker_tag_alias.sh fedora fedora-rpm - if [[ "$TRAVIS_BRANCH" == "master" ]] ; then echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin && - docker pull $DOCKER_ORG/openresty:bookworm && - docker tag $DOCKER_ORG/openresty:bookworm $DOCKER_ORG/openresty:latest && + docker pull $DOCKER_ORG/openresty:trixie && + docker tag $DOCKER_ORG/openresty:trixie $DOCKER_ORG/openresty:latest && docker push $DOCKER_ORG/openresty:latest ; fi @@ -225,6 +231,7 @@ jobs: stage: build-fat arch: arm64 script: + - ./docker_build_and_push_flavor_fat.sh trixie-fat-aarch64 trixie/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bookworm-fat-aarch64 bookworm/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bullseye-fat-aarch64 bullseye/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh alpine-fat-aarch64 alpine/Dockerfile.fat @@ -233,6 +240,7 @@ jobs: arch: amd64 stage: build-fat script: + - ./docker_build_and_push_flavor_fat.sh trixie-fat-amd64 trixie/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bookworm-fat-amd64 bookworm/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh bullseye-fat-amd64 bullseye/Dockerfile.fat - ./docker_build_and_push_flavor_fat.sh alpine-fat-amd64 alpine/Dockerfile.fat @@ -240,6 +248,7 @@ jobs: - name: Create and push manifests for fat multi-arch images stage: manifest-fat script: + - ./docker_manifest.sh trixie-fat trixie-fat-amd64 trixie-fat-aarch64 - ./docker_manifest.sh bookworm-fat bookworm-fat-amd64 bookworm-fat-aarch64 - ./docker_manifest.sh bullseye-fat bullseye-fat-amd64 bullseye-fat-aarch64 - ./docker_manifest.sh alpine-fat alpine-fat-amd64 alpine-fat-aarch64 diff --git a/BUILDING.md b/BUILDING.md index 46cede8..4e9c0b0 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -144,6 +144,7 @@ You can derive your own Docker images from this to install your own packages. S This Docker image can be built and customized by cloning the repo and running `docker build` with the desired Dockerfile: + * [Debian Trixie 13 DEB](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile) (`trixie/Dockerfile`) * [Debian Bookworm 12 DEB](https://github.com/openresty/docker-openresty/blob/master/bookworm/Dockerfile) (`bookworm/Dockerfile`) * [Debian Bullseye 11 DEB](https://github.com/openresty/docker-openresty/blob/master/bullseye/Dockerfile) (`bullseye/Dockerfile`) diff --git a/README.md b/README.md index dfad0a5..4bc023f 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,9 @@ The following "flavors" are available and built from [upstream OpenResty package - [`centos7`, (*centos7/Dockerfile* with `el7`)](https://github.com/openresty/docker-openresty/blob/master/centos7/Dockerfile) - [`fedora`, `fedora-rpm`, (*fedora/Dockerfile* with `fc36`)](https://github.com/openresty/docker-openresty/blob/master/fedora/Dockerfile) - [`rocky`, (*fedora/Dockerfile* with `rockylinux`)](https://github.com/openresty/docker-openresty/blob/master/fedora/Dockerfile) +- [`trixie-buildpack`, (*trixie/Dockerfile.buildpack*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile.buildpack) +- [`trixie-fat`, (*trixie/Dockerfile.fat*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile.fat) +- [`trixie`, (*trixie/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/trixie/Dockerfile) - [`windows`, (*windows/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/windows/Dockerfile) The following "flavors" are built from source and are intended for more advanced and custom usage, caveat emptor: @@ -115,7 +118,7 @@ The following "flavors" are built from source and are intended for more advanced - [`jammy`, (*jammy/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/jammy/Dockerfile) - [`noble`, (*noble/Dockerfile*)](https://github.com/openresty/docker-openresty/blob/master/noble/Dockerfile) -The `openresty/openresty:latest` tag points to the latest `bookworm` image. +The `openresty/openresty:latest` tag points to the latest `trixie` 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](https://github.com/zherczeg/sljit/issues/89) is disabled for `s390x`. @@ -195,7 +198,7 @@ OPM Starting at version 1.11.2.2, OpenResty for Linux includes a [package manager called `opm`](https://github.com/openresty/opm#readme), which can be found at `/usr/local/openresty/bin/opm`. -`opm` is built in all the images except `alpine` and `bullseye` and `bookworm`. +`opm` is built in all the images except `alpine` and `bullseye` and `bookworm` and `trixie`. To use `opm` in the `alpine` image, you must also install the `curl` and `perl` packages; they are not included by default because they double the image size. You may install them like so: `apk add --no-cache curl perl`. diff --git a/Taskfile.yml b/Taskfile.yml index 74962da..58e3ca1 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,4 +1,4 @@ -# https://taskfile.dev/installation +# https://taskfile.dev/installation version: '3' @@ -6,7 +6,7 @@ tasks: default: cmds: - task --list-all - + build-all-arm64: deps: - build-all-upstream-arm64 @@ -27,6 +27,7 @@ tasks: - docker build -t centos-aarch64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - docker build -t centos7-aarch64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . - docker build -t fedora-aarch64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=aarch64 . + - docker build -t trixie-aarch64 -f trixie/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . - docker build -t bookworm-aarch64 -f bookworm/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" --build-arg RESTY_APT_ARCH="arm64" . - docker build -t bullseye-aarch64 -f bullseye/Dockerfile --build-arg RESTY_APT_REPO="https://openresty.org/package/arm64/debian" . @@ -38,6 +39,7 @@ tasks: - docker build -t centos-amd64 -f centos/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - docker build -t centos7-amd64 -f centos7/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . - docker build -t fedora-amd64 -f fedora/Dockerfile --build-arg RESTY_RPM_ARCH=x86_64 . + - docker build -t trixie-amd64 -f trixie/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . - docker build -t bookworm-amd64 -f bookworm/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . - docker build -t bullseye-amd64 -f bullseye/Dockerfile --build-arg RESTY_APT_ARCH=amd64 . diff --git a/trixie/Dockerfile b/trixie/Dockerfile new file mode 100644 index 0000000..a0e18e8 --- /dev/null +++ b/trixie/Dockerfile @@ -0,0 +1,65 @@ +# Dockerfile - Debian 13 Trixie - DEB version +# https://github.com/openresty/docker-openresty + +ARG RESTY_IMAGE_BASE="debian" +ARG RESTY_IMAGE_TAG="trixie-slim" + +FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} + +LABEL maintainer="Evan Wies " + +# RESTY_DEB_FLAVOR build argument is used to select other +# OpenResty Debian package variants. +# For example: "-debug" or "-valgrind" +ARG RESTY_DEB_FLAVOR="" +ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" +ARG RESTY_APT_REPO="https://openresty.org/package/debian" +ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" +ARG RESTY_APT_ARCH="amd64" +ARG RESTY_IMAGE_BASE="debian" +ARG RESTY_IMAGE_TAG="bookworm-slim" + +LABEL resty_image_base="${RESTY_IMAGE_BASE}" +LABEL resty_image_tag="${RESTY_IMAGE_TAG}" +LABEL resty_apt_repo="${RESTY_APT_REPO}" +LABEL resty_apt_pgp="${RESTY_APT_PGP}" +LABEL resty_apt_arch="${RESTY_APT_ARCH}" +LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" +LABEL resty_deb_version="${RESTY_DEB_VERSION}" + + +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates \ + gettext-base \ + gnupg \ + wget \ + && wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && echo "\nTypes: deb\nURIs: $RESTY_APT_REPO\nSuites: $RESTY_IMAGE_TAG\nComponents: openresty\nEnabled: yes\nArchitectures: $RESTY_APT_ARCH\nSigned-By: /etc/apt/trusted.gpg.d/openresty-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources \ + && DEBIAN_FRONTEND=noninteractive apt-get remove -y --purge \ + gnupg \ + wget \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /var/run/openresty \ + && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ + && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log + +# Add additional binaries into PATH for convenience +ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" + +# Copy nginx configuration files +COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf +COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf + +CMD ["/usr/bin/openresty", "-g", "daemon off;"] + +# Use SIGQUIT instead of default SIGTERM to cleanly drain requests +# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls +STOPSIGNAL SIGQUIT diff --git a/trixie/Dockerfile.buildpack b/trixie/Dockerfile.buildpack new file mode 100644 index 0000000..61a4562 --- /dev/null +++ b/trixie/Dockerfile.buildpack @@ -0,0 +1,82 @@ +# Dockerfile - buildpack-deps +# https://github.com/openresty/docker-openresty + +ARG RESTY_IMAGE_BASE="buildpack-deps" +ARG RESTY_IMAGE_TAG="trixie" + +FROM ${RESTY_IMAGE_BASE}:${RESTY_IMAGE_TAG} + +LABEL maintainer="Evan Wies " + +# RESTY_DEB_FLAVOR build argument is used to select other +# OpenResty Debian package variants. +# For example: "-debug" or "-valgrind" +ARG RESTY_DEB_FLAVOR="" +ARG RESTY_DEB_VERSION="=1.27.1.2-1~bookworm1" +ARG RESTY_APT_REPO="https://openresty.org/package/debian" +ARG RESTY_APT_PGP="https://openresty.org/package/pubkey.gpg" +ARG RESTY_APT_ARCH="amd64" +ARG RESTY_IMAGE_BASE="buildpack-deps" +ARG RESTY_IMAGE_TAG="bookworm" + +ARG RESTY_LUAROCKS_VERSION="3.12.2" + +LABEL resty_image_base="${RESTY_IMAGE_BASE}" +LABEL resty_image_tag="${RESTY_IMAGE_TAG}" +LABEL resty_apt_repo="${RESTY_APT_REPO}" +LABEL resty_apt_pgp="${RESTY_APT_PGP}" +LABEL resty_apt_arch="${RESTY_APT_ARCH}" +LABEL resty_deb_flavor="${RESTY_DEB_FLAVOR}" +LABEL resty_deb_version="${RESTY_DEB_VERSION}" +LABEL resty_luarocks_version="${RESTY_LUAROCKS_VERSION}}" + +# Install OpenResty +RUN wget -qO - ${RESTY_APT_PGP} | gpg --dearmor > /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chown root:root /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod ugo+r /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && chmod go-w /etc/apt/trusted.gpg.d/openresty-keyring.gpg \ + && echo "\nTypes: deb\nURIs: $RESTY_APT_REPO\nSuites: $RESTY_IMAGE_TAG\nComponents: openresty\nEnabled: yes\nArchitectures: $RESTY_APT_ARCH\nSigned-By: /etc/apt/trusted.gpg.d/openresty-keyring.gpg" >> /etc/apt/sources.list.d/debian.sources \ + && DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openresty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + openresty-resty${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + openresty-opm${RESTY_DEB_FLAVOR}${RESTY_DEB_VERSION} \ + openresty-openssl3${RESTY_DEB_FLAVOR}-dev \ + openresty-pcre2${RESTY_DEB_FLAVOR}-dev \ + openresty-zlib${RESTY_DEB_FLAVOR}-dev \ + && mkdir -p /var/run/openresty \ + && ln -sf /dev/stdout /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/access.log \ + && ln -sf /dev/stderr /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/logs/error.log + +# Install LuaRocks +RUN curl -fSL https://luarocks.github.io/luarocks/releases/luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ + && tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \ + && cd luarocks-${RESTY_LUAROCKS_VERSION} \ + && ./configure \ + --prefix=/usr/local/openresty/luajit \ + --with-lua=/usr/local/openresty/luajit \ + --with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \ + && make build \ + && make install \ + && cd /tmp \ + && rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz + +# Add additional binaries into PATH for convenience +ENV PATH="$PATH:/usr/local/openresty${RESTY_DEB_FLAVOR}/luajit/bin:/usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/sbin:/usr/local/openresty${RESTY_DEB_FLAVOR}/bin" + +# Add LuaRocks paths +# If OpenResty changes, these may need updating: +# /usr/local/openresty/bin/resty -e 'print(package.path)' +# /usr/local/openresty/bin/resty -e 'print(package.cpath)' +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/?.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" + +# Copy nginx configuration files +COPY nginx.conf /usr/local/openresty${RESTY_DEB_FLAVOR}/nginx/conf/nginx.conf +COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf + +CMD ["/usr/bin/openresty", "-g", "daemon off;"] + +# Use SIGQUIT instead of default SIGTERM to cleanly drain requests +# See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls +STOPSIGNAL SIGQUIT diff --git a/trixie/Dockerfile.fat b/trixie/Dockerfile.fat new file mode 100644 index 0000000..80ec18e --- /dev/null +++ b/trixie/Dockerfile.fat @@ -0,0 +1,34 @@ +# Dockerfile - Debian 13 Trixie Fat - DEB version +# https://github.com/openresty/docker-openresty +# +# This builds upon the base OpenResty Trixie image, +# adding useful packages and utilities. +# +# Currently it just adds the openresty-opm package. +# + +ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" +ARG RESTY_FAT_IMAGE_TAG="trixie" + +FROM ${RESTY_FAT_IMAGE_BASE}:${RESTY_FAT_IMAGE_TAG} + +ARG RESTY_FAT_IMAGE_BASE="openresty/openresty" +ARG RESTY_FAT_IMAGE_TAG="bookworm" + +# RESTY_FAT_DEB_FLAVOR build argument is used to select other +# OpenResty Debian package variants. +# For example: "-debug" or "-valgrind" +ARG RESTY_FAT_DEB_FLAVOR="" +ARG RESTY_FAT_DEB_VERSION="=1.27.1.2-1~bookworm1" + +LABEL maintainer="Evan Wies " +LABEL resty_fat_deb_flavor="${RESTY_FAT_DEB_FLAVOR}" +LABEL resty_fat_deb_version="${RESTY_FAT_DEB_VERSION}" +LABEL resty_fat_image_base="${RESTY_FAT_IMAGE_BASE}" +LABEL resty_fat_image_tag="${RESTY_FAT_IMAGE_TAG}" + +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + openresty-resty${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ + openresty-opm${RESTY_FAT_DEB_FLAVOR}${RESTY_FAT_DEB_VERSION} \ + && rm -rf /var/lib/apt/lists/*