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

Use a multistage image to remove all redundancies on Dockerfiles #2547

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

ferrastas
Copy link
Contributor

Description

As all Kaniko variants should be upgraded at once, all following the same specifications, it is easier for maintainers to bump Go or other image dependencies in a single place.

On top of that, there were an issue building ppc64le images because of a semantic error on the if condition that checks the arch used.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

As all Kaniko variants should be upgraded at once, all following the same specifications, it is easier for maintainers to bump Go or other image dependencies in a single place.

On top of that, there were an issue building `ppc64le` images because of a semantic error on the if condition that checks the arch used.

Signed-off-by: Ferran Vidal <ferran.vidal.p@gmail.com>
@ferrastas
Copy link
Contributor Author

Hey @aaron-prindle, while working on #2540 I realized that all Dockerfiles can be merged into one and use a multistage build approach. In that way all Dockerfile changes are distributed in the same way, caches are reused more efficiently, and some other benefits.

Also, my last MR has an invalid if condition that breaks the build for ppc64le.

Copy link
Collaborator

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

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

Thanks for this @ferrastas! LGTM

@aaron-prindle aaron-prindle merged commit 507fe00 into GoogleContainerTools:main Jun 5, 2023
kylecarbs pushed a commit to coder/kaniko that referenced this pull request Jul 12, 2023
…gleContainerTools#2547)

As all Kaniko variants should be upgraded at once, all following the same specifications, it is easier for maintainers to bump Go or other image dependencies in a single place.

On top of that, there were an issue building `ppc64le` images because of a semantic error on the if condition that checks the arch used.

Signed-off-by: Ferran Vidal <ferran.vidal.p@gmail.com>
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