[Distroless] Enable Distroless Java SDK based container images
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
# Summary
Add [distroless](https://github.com/GoogleContainerTools/distroless) variants to existing Java SDK container images:
- beam-sdk/beam_java17_sdk
- beam-sdk/beam_java21_sdk
# Description
The [Publish Beam SDK Snapshots](https://github.com/apache/beam/blob/master/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml), and [build_release_candidate](https://github.com/apache/beam/blob/master/.github/workflows/build_release_candidate.yml) GitHub workflows build and publish Beam container images using docker. The [distroless](https://github.com/GoogleContainerTools/distroless) base images by design lack tools assumed to exist in Java Dockerfiles such as file system tools. In order to reuse the existing Dockerfile to add a distroless variant, we need to employ a [multi-stage build](https://docs.docker.com/build/building/multi-stage/#use-a-previous-stage-as-a-new-stage) approach.
# Blockers
- [x] #32819
- [x] #32820
# Measures of Done
- [x] Add Java SDK Dockerfile [distroless](https://github.com/GoogleContainerTools/distroless) variants (PR: #33173)
- [x] #33226
- [x] #32899
- [x] #33201
Contributor guide
Assessment
This issue has not been assessed yet.