Skip to content

Distroless orchestratord#35595

Merged
alex-hunt-materialize merged 3 commits intoMaterializeInc:mainfrom
alex-hunt-materialize:distroless
Mar 25, 2026
Merged

Distroless orchestratord#35595
alex-hunt-materialize merged 3 commits intoMaterializeInc:mainfrom
alex-hunt-materialize:distroless

Conversation

@alex-hunt-materialize
Copy link
Copy Markdown
Contributor

@alex-hunt-materialize alex-hunt-materialize commented Mar 23, 2026

Uses distroless as the base image for orchestratord.

Also adds a new function to Composition to pull/build images without launching containers.

Motivation

Smaller and more secure image.

Resolves https://linear.app/materializeinc/issue/CLO-28/migrate-orchestratord-to-distroless

Verification

Ran all the orchestratord tests.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 23, 2026

Thanks for opening this PR! Here are a few tips to help make the review process smooth for everyone.

PR title guidelines

  • Use imperative mood: "Fix X" not "Fixed X" or "Fixes X"
  • Be specific: "Fix panic in catalog sync when controller restarts" not "Fix bug" or "Update catalog code"
  • Prefix with area if helpful: compute: , storage: , adapter: , sql:

Pre-merge checklist

  • The PR title is descriptive and will make sense in the git log.
  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).

@alex-hunt-materialize alex-hunt-materialize force-pushed the distroless branch 3 times, most recently from d81622e to 3d570ec Compare March 24, 2026 11:29
@def-
Copy link
Copy Markdown
Contributor

def- commented Mar 25, 2026

This looks interesting! Planning to look into it for environmentd/clusterd too?

@alex-hunt-materialize
Copy link
Copy Markdown
Contributor Author

Planning to look into it for environmentd/clusterd too?

I think we should, but those will likely be harder. They subprocess out to other things, like SSH.

@alex-hunt-materialize alex-hunt-materialize marked this pull request as ready for review March 25, 2026 12:17
Copy link
Copy Markdown
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

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

What is the main motivation for this? I assumed it's to reduce image size, but the image has gotten larger:

Maybe I'm missing something. Edit: I see, security is also a concern.

Comment thread misc/images/distroless-prod-base/Dockerfile Outdated
@alex-hunt-materialize alex-hunt-materialize marked this pull request as draft March 25, 2026 13:31
Copy link
Copy Markdown
Contributor

@def- def- left a comment

Choose a reason for hiding this comment

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

26 MB, sweet! https://hub.docker.com/layers/materialize/orchestratord/mzbuild-PVPQF24A6HWY5JAFBRTNC4RLHOQQICLX/images/sha256-24914c13098065fe15e6a0ce711a3a906057335fceed19ad01aa1c45c4907eae
About using this: How do you then locally debug if something goes wrong with orchestratord since you can't ssh into it?
Do you plan to look into converting other containers to be distroless? If not, I might be interested in looking into that, we'd gain some CI speedup from smaller images too. I'd probably have to check in with how people in the database team feel about it, since it will make local debugging more annoying from what I can tell.

@alex-hunt-materialize
Copy link
Copy Markdown
Contributor Author

About using this: How do you then locally debug if something goes wrong with orchestratord since you can't ssh into it?

You can use an ephemeral container for that (ie: kubectl debug). I've never felt the need to exec into orchestratord, though. It's all in the single rust binary, there isn't much it interacts with in the surrounding container.

Do you plan to look into converting other containers to be distroless? If not, I might be interested in looking into that, we'd gain some CI speedup from smaller images too.

I don't have as much knowledge of what is required for the other containers, so if you want to take that on, be my guest.

I'd probably have to check in with how people in the database team feel about it, since it will make local debugging more annoying from what I can tell.

I think they can use nsenter to get a pretty nice debugging experience. It would be roughly the same as with kubectl debug.

@alex-hunt-materialize alex-hunt-materialize marked this pull request as ready for review March 25, 2026 15:32
@alex-hunt-materialize alex-hunt-materialize merged commit 80e6413 into MaterializeInc:main Mar 25, 2026
144 checks passed
@alex-hunt-materialize alex-hunt-materialize deleted the distroless branch March 25, 2026 18:34
antiguru pushed a commit to antiguru/materialize that referenced this pull request Mar 26, 2026
Uses distroless as the base image for orchestratord.

Also adds a new function to Composition to pull/build images without
launching containers.

### Motivation

Smaller and more secure image.

Resolves
https://linear.app/materializeinc/issue/CLO-28/migrate-orchestratord-to-distroless

### Verification

Ran all the orchestratord tests.
def- added a commit that referenced this pull request Apr 20, 2026
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.

2 participants