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

chore(build) make distroless default Docker target #3043

Merged
merged 1 commit into from
Oct 12, 2022

Conversation

rainest
Copy link
Contributor

@rainest rainest commented Oct 11, 2022

What this PR does / why we need it:

Move the distroless target to the end of the Dockerfile. This makes it the default when Docker buildx builds are run without a target. Although our make targets and release workflow do specify targets, custom CD may not, and this change leads them to produce a better output.

Which issue this PR fixes:
Inspired by #3036

Special notes for your reviewer:

https://gist.github.com/rainest/ae3f00050b66429aca052eeb7057b540#file-docker-txt-L324-L347 is the example buildx build without this change.

The docker build invocation above just builds everything. There's nothing we can really do for vanilla Docker builds; they always build everything unless you provide a target.

This is listed as a fix since we never intended for the FIPS target to be the default and don't have hard guarantees around the order of the Dockerfile. I expect it's unlikely that anyone was omitting a target in a custom pipeline with the expectation that it would produce the FIPS image, given that those aren't really officially a thing.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR

@rainest rainest temporarily deployed to Configure ci October 11, 2022 22:09 Inactive
Move the distroless target to the end of the Dockerfile. This makes it
the default when Docker builds are run without a target. Although our
make targets and release workflow _do_ specify targets, custom CD may
not, and this change leads them to produce a better output.
@rainest rainest temporarily deployed to Configure ci October 11, 2022 22:12 Inactive
@rainest rainest marked this pull request as ready for review October 11, 2022 22:12
@rainest rainest requested a review from a team as a code owner October 11, 2022 22:12
@rainest rainest temporarily deployed to Configure ci October 11, 2022 22:35 Inactive
@rainest rainest temporarily deployed to Configure ci October 11, 2022 22:35 Inactive
@rainest rainest enabled auto-merge (squash) October 11, 2022 22:38
@rainest rainest temporarily deployed to Configure ci October 12, 2022 06:47 Inactive
@rainest rainest temporarily deployed to Configure ci October 12, 2022 06:47 Inactive
@rainest rainest temporarily deployed to Configure ci October 12, 2022 06:53 Inactive
@rainest rainest merged commit 94113be into main Oct 12, 2022
@rainest rainest deleted the chore/dockerfile-rearrange branch October 12, 2022 07:51
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