Skip to content

release/ci: Compress the debug sections of the released binaries - #49295

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
phlax:release-compress-debug-sections
Nov 16, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
phlax:release-compress-debug-sections

Conversation

@phlax

@phlax phlax commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Commit Message: release/ci: Compress the debug sections of the released binaries
Additional Description:

The release build (release, release.server_only) links with -Wl,--compress-debug-sections=zlib (lld, using the link's cores): the unstripped debug binaries, and the debug images built from them, are several times smaller, and quicker to package, upload and push. gdb/lldb read compressed debug sections (zlib rather than zstd, as the debug images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped binaries are unchanged.

It is a command-line --linkopt, not set in the bundled transition, so only the link actions change (the compiles are not reconfigured), and it is added after the release tests, so their links are unchanged.

Risk Level: low
Testing: CI, envoy-ci-staging
Docs Changes: n/a
Release Notes: n/a

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the release debug-section compression change.

No open issues 🎉

What changed in this PR

Reduces release artifact sizes by compressing debug sections in release binaries and the debug images built from them.

Changes:

  • Adds --linkopt=-Wl,--compress-debug-sections=zstd to release build options.
  • Applies the option after release tests, leaving test links and compile options unchanged.
File Description
ci/​do_ci.sh Enables zstd debug-section compression for release binary links.

Review effort: Balanced

@phlax
phlax force-pushed the release-compress-debug-sections branch from 094a1cc to ca7e7da Compare November 15, 2026 18:33
@phlax
phlax requested a balanced review from Copilot November 15, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues blocking the release debug-section compression change.

No open issues 🎉

Review effort: Balanced

@phlax
phlax force-pushed the release-compress-debug-sections branch from ca7e7da to 6b1e756 Compare November 15, 2026 19:00
@phlax
phlax requested a balanced review from Copilot November 15, 2026 19:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the release debug-section compression change.

No open issues 🎉

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new TODO comment in ci/do_ci.sh:1121 lacks the contributor’s GitHub handle required by STYLE.md.

1 open issue

Review effort: Balanced

Comment thread ci/do_ci.sh Resolved
The release build links with `-Wl,--compress-debug-sections=zlib`: the
debug binaries, and so the debug images built from them, are several
times smaller, and quicker to package, upload and push. zlib rather
than zstd, as the debug images' gdb (12, Ubuntu 22.04) reads zstd only
from gdb 13.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured),
and only for the release build (not the release tests).

Signed-off-by: Ryan Northey <[email protected]>
@phlax
phlax force-pushed the release-compress-debug-sections branch from c283981 to 0e0ade3 Compare November 15, 2026 20:58
@phlax
phlax requested a balanced review from Copilot November 15, 2026 20:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the release debug-section compression change.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@phlax
phlax merged commit a18362f into envoyproxy:main Nov 16, 2026
26 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 16, 2026
Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (#49294, #49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.40): the images are built from this branch's bases
(the `Dockerfile-envoy` digests: ubuntu 5ec03bb3, distroless 6a2a3346), the new
modules are added to this branch's pins (`rules_cc` 0.2.25, `rules_foreign_cc`
0.16.0, `su-exec` 0.3), and the lockfiles are regenerated.

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit that referenced this pull request Nov 17, 2026
Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (#49294, #49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Signed-off-by: Ryan Northey <[email protected]>

Backport note (release/v1.40): the images are built from this branch's bases
(the `Dockerfile-envoy` digests: ubuntu 5ec03bb3, distroless 6a2a3346), the new
modules are added to this branch's pins (`rules_cc` 0.2.25, `rules_foreign_cc`
0.16.0, `su-exec` 0.3), and the lockfiles are regenerated.

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.39): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.38): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.38): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.38): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.38): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
…oyproxy#49295)

The release build (`release`, `release.server_only`) links with
`-Wl,--compress-debug-sections=zlib` (lld, using the link's cores): the
unstripped debug binaries, and the debug images built from them, are
several times smaller, and quicker to package, upload and push. gdb/lldb
read compressed debug sections (zlib rather than zstd, as the debug
images' gdb, 12 on Ubuntu 22.04, reads zstd only from 13); the stripped
binaries are unchanged.

It is a command-line `--linkopt`, not set in the `bundled` transition,
so only the link actions change (the compiles are not reconfigured), and
it is added after the release tests, so their links are unchanged.

Signed-off-by: Ryan Northey <[email protected]>
(cherry picked from commit a18362f)
Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
…yproxy#49259)

Builds all of the release container images with bazel (rules_oci)
instead of `docker buildx`: `envoy`, `envoy-debug`, `envoy-contrib`,
`envoy-contrib-debug`, `envoy-tools`, `envoy-distroless`,
`envoy-contrib-distroless`, matching the stages of `Dockerfile-envoy`.

- Distroless images: the pinned distroless base, plus the config and
binary layers.
- Ubuntu images: the pinned ubuntu base (`mirror.gcr.io`, same digest as
the Dockerfile), with `ca-certificates`, `openssl` and `tzdata` from a
pinned `snapshot.ubuntu.com` timestamp (rules_distroless). The `RUN`
steps of the `envoy-base` stage become layers:
- `oci_base_edit` (toolshed, envoyproxy/toolshed#5597): adds `envoy` to
the base's passwd/group/shadow/gshadow as `adduser --group --system
envoy` does (uid/gid 101), `/home/envoy`, and the packages to the dpkg
status;
- the package data, the CA bundle (`cacerts`), and `/etc/timezone` /
`/etc/localtime` (`Etc/UTC`);
- `/etc/envoy/{envoy.yaml,VERSION.txt}`, `/docker-entrypoint.sh`,
`su-exec`, the binary (+ `.dwp` for debug), the tools for `-tools`; same
entrypoint/cmd/env/port.
- The binaries use the same opt/strip transition as the release bundle,
so they come from the release build.
- The debug layers are gzipped at level 1: their contents' debug
sections are already compressed (envoyproxy#49294, envoyproxy#49295), which gzip barely
shrinks.
- `release.publish` strips the release binaries locally: the client
downloads them anyway (the release tarball and images are built
locally), while a remote strip waits on a worker fetching the freshly
linked binary (~30s in envoy-ci-staging).

CI targets:
- `release.server`: the release binaries and tools;
`release.server_only` (used by the Publish workflow, and so by release
branches) is the same, unchanged.
- `release.publish` (new): as `release.server`, and the distro packages,
and the images (`//distribution/docker:images`) as OCI tarballs (the
image layout, as `docker buildx -o type=oci` writes it for a single
platform) in the release binary directory.
- `docker` is unchanged (buildx): where `release-publish` is set its job
is skipped, as `release.publish` writes the images to
`build_images/<image>.<arch>.tar` itself. Local loads and multi-platform
builds still use it.

Publish switches to `release.publish` here: `.github/config.yml` sets
`release-publish: true`, so each arch's binary job builds the release
binaries, the images and the packages in one invocation and uploads them
(`release.<arch>`, `oci.<arch>`, `packages.<arch>`), and the separate
Docker OCI and Packages jobs are skipped. Branches without
`release-publish` (the release branches) keep `release.server_only` and
the separate jobs, with buildx.

Differences from the buildx images:
- No `apt-get upgrade`: base paCommit Message: distribution: Build the release container images with
rules_oci
Additional Description:ckages are those of the pinned base until
its digest (and the snapshot) is bumped.
- Only the CA bundle in `/etc/ssl/certs`, not the per-certificate hash
links.

This overrides `envoy_toolshed` with envoyproxy/toolshed#5597 (on the
v0.5.20 release) until it is released; the docs/external jobs fail with
the override ("Missing version info: envoy_toolshed").

---------

Backport note (release/v1.37): this branch builds with WORKSPACE, so:

- rules_oci is 2.2.6, which needs only the aspect_bazel_lib and
  bazel_features that this branch has (later versions need tar.bzl
  0.7 and bazel_lib 3). Its toolchains, and the base images (this
  branch's `Dockerfile-envoy` digests), are set up in
  `bazel/dependency_imports.bzl`.
- rules_distroless and tar.bzl's rules are bzlmod-only: the three
  Ubuntu packages are fetched as `.deb` archives (the same snapshot,
  versions and hashes), and `flatten`, `cacerts` and the OCI tarballs
  are small local rules over the hermetic bsdtar
  (`distribution/docker/layers.bzl`).
- no lockfiles, and no workflow changes (the workflows run from `main`).
- the distroless base is this branch's (`base-nossl-debian12`), and su-exec is
  `@com_github_ncopa_suexec` here. The dependency metadata is inline in
  `repository_locations.bzl` (no `deps.yaml` on this branch).

(cherry picked from commit aa082aa)
Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants