Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish distroless images #385

Merged
merged 10 commits into from
Jun 10, 2024
Merged

ci: publish distroless images #385

merged 10 commits into from
Jun 10, 2024

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Jun 5, 2024

We've had a long history of Alpine vulnerability reports on Relay's Docker images. The patches percolate into the upstream tools that are bundled in Alpine, then into Alpine, then into the Alpine docker image release, and finally into a Relay release.

Since Relay is a simple Go binary, we could take advantage of Google's "distroless" container system. This is an extremely stripped down debian12 image with "just" the Go binary. The attack surface is smaller and we'd have less necessary maintenance.

This PR adds two new image manifests:

  • static-debian12-nonroot (based on gcr.io/distroless/static-debian12:nonroot)
  • static-debian12-debug-nonroot (based on gcr.io/distroless/static-debian12:debug-nonroot).

Each manifest supports amd64, armv7, and armv8 architectures. There is additional support for ppc64le and s390x in those base images, but I haven't exposed them here yet in order to give a similar offering to the Alpine image (note: we're missing i386.)

TODO:

  • Add some documentation on using the distroless image
  • Add a high level description of the available image types
  • Manual test of nonroot image
  • Manual test of debug-nonroot image
    BEGIN_COMMIT_OVERRIDE
    feat: publish distroless debian12 image
    END_COMMIT_OVERRIDE

@cwaldren-ld cwaldren-ld force-pushed the cw/sc-163093/distroless branch from 2566e13 to 535458b Compare June 5, 2024 22:05
@cwaldren-ld cwaldren-ld force-pushed the cw/sc-163093/distroless branch from adb15f6 to 2c20b3a Compare June 5, 2024 23:58
@cwaldren-ld cwaldren-ld force-pushed the cw/sc-163093/distroless branch from b50ab60 to c7fbdbb Compare June 7, 2024 17:46
@cwaldren-ld cwaldren-ld marked this pull request as ready for review June 7, 2024 17:46
@cwaldren-ld cwaldren-ld requested a review from a team June 7, 2024 17:46
@cwaldren-ld cwaldren-ld changed the title ci: generate distroless images ci: publish distroless images Jun 7, 2024
@cwaldren-ld cwaldren-ld force-pushed the cw/sc-163093/distroless branch from 2492936 to 0e3d7d4 Compare June 10, 2024 23:03
@cwaldren-ld cwaldren-ld added the v8 label Jun 10, 2024
@cwaldren-ld cwaldren-ld merged commit fe0155f into v8 Jun 10, 2024
9 of 10 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/sc-163093/distroless branch June 10, 2024 23:14
cwaldren-ld added a commit that referenced this pull request Jun 12, 2024
We've had a long history of Alpine vulnerability reports on Relay's
Docker images. The patches percolate into the upstream tools that are
bundled in Alpine, then into Alpine, then into the Alpine docker image
release, and finally into a Relay release.

Since Relay is a simple Go binary, we could take advantage of Google's
"distroless" container system. This is an extremely stripped down
debian12 image with "just" the Go binary. The attack surface is smaller
and we'd have less necessary maintenance.

This PR adds two new image manifests: 
- `static-debian12-nonroot` (based on
`gcr.io/distroless/static-debian12:nonroot`)
- `static-debian12-debug-nonroot` (based on
`gcr.io/distroless/static-debian12:debug-nonroot`).

Each manifest supports amd64, armv7, and armv8 architectures. There is
additional support for `ppc64le` and `s390x` in those base images, but I
haven't exposed them here yet in order to give a similar offering to the
Alpine image (note: we're missing `i386`.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants