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

Include warmer in debug image #497

Conversation

wms
Copy link
Contributor

@wms wms commented Dec 20, 2018

When using Kaniko with certain build systems, such as GitLab CI, it is necessary to use the 'debug' image and override the entrypoint, so that an arbitrary build script can be executed within the container. Unfortunately, the 'warmer' binary is not available in the 'debug' image, making it impossible to perform a base image cache warmup using such build systems.

This patch addresses this by ensuring that the 'out/warmer' target is made in the initial stage, and that all 'out' files are copied to '/kaniko' in the final stage.

If anybody wants to make use of this change before its merged, I've pushed an image to Docker Hub named fountainheadtech/kaniko:debug-warmer.

@container-tools-bot
Copy link
Collaborator

Hi @warrenseymour. Thanks for your PR.

I'm waiting for a GoogleContainerTools member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sharifelgamal
Copy link
Contributor

Hey @warrenseymour, everything looks good to me in the PR. Once you rebase to fix the merge conflicts, I'll go ahead and merge this PR. Thanks!

@mamoit
Copy link

mamoit commented Feb 13, 2019

@warrenseymour Do you need some help rebasing this?

@sanmai-NL
Copy link

@warrenseymour: would like for you to complete this.

@wms
Copy link
Contributor Author

wms commented Mar 15, 2019

Sorry folks, had totally forgotten about this. I'll get this mergable this afternoon.

When using Kaniko with certain build systems, such as GitLab CI, it is necessary to use the 'debug' image and override the entrypoint, so that an arbitrary build script can be executed within the container.  Unfortunately, the 'warmer' binary is not available in the 'debug' image, making it impossible to perform a base image cache warmup using such build systems.

This patch addresses this by ensuring that the 'out/warmer' target is made in the initial stage, and that all 'out' files are copied to '/kaniko' in the final stage.
@wms wms force-pushed the include-warmer-in-debug-image branch from cbe1520 to 319bfde Compare March 15, 2019 11:09
@wms
Copy link
Contributor Author

wms commented Mar 15, 2019

Rebased and ready for re-review

@wms
Copy link
Contributor Author

wms commented Mar 15, 2019

I've also updated fountainheadtech/kaniko:debug-warmer if anybody wants to use the latest version of Kaniko with this patch applied before it is merged.

@mamoit
Copy link

mamoit commented May 16, 2019

@sharifelgamal is there anything blocking this?

@tejal29 tejal29 merged commit a111681 into GoogleContainerTools:master Aug 9, 2019
@tejal29
Copy link
Member

tejal29 commented Aug 9, 2019

@mamoit thanks for the PR!

@mamoit
Copy link

mamoit commented Aug 9, 2019

@tejal29 It was not mine :) it was @warrenseymour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants