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

Whitelist /busybox in the debug image #369

Merged
merged 1 commit into from
Sep 28, 2018

Conversation

vbehar
Copy link
Contributor

@vbehar vbehar commented Sep 27, 2018

In the debug image, declare /busybox as a volume so that it is automatically whitelisted, because we don't want to delete it when building multi-stages images.

FYI this is required when using Jenkins, because we need to use the debug kaniko image to be able to start the container "doing nothing" (with /busybox/cat) before building (by executing /kaniko/executor directly inside the container)
See https://issues.jenkins-ci.org/browse/JENKINS-52576

@container-tools-bot
Copy link
Collaborator

Hi @vbehar. 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.

@priyawadhwa
Copy link
Collaborator

Hey @vbehar, instead of hardcoding /busybox into the whitelist, which may negatively impact people trying to use that directory with the standard (non-debug) image, let's instead add

VOLUME /busybox
to the debug Dockerfile here, which should automatically add it to the whitelist for the debug image only.

In the debug image, declare /busybox as a volume so that it is automatically whitelisted, because we don't want to delete it when building multi-stages images.

FYI this is required when using Jenkins, because we need to use the debug kaniko image to be able to start the container "doing nothing" (with /busybox/cat) before building (by executing /kaniko/executor directly inside the container)
See https://issues.jenkins-ci.org/browse/JENKINS-52576
@vbehar vbehar changed the title Whitelist /busybox Whitelist /busybox in the debug image Sep 28, 2018
@vbehar
Copy link
Contributor Author

vbehar commented Sep 28, 2018

@priyawadhwa ok thanks, yes that's way better (and easier) that way!

Copy link
Collaborator

@priyawadhwa priyawadhwa left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for contributing!

@priyawadhwa priyawadhwa merged commit 5f9f71d into GoogleContainerTools:master Sep 28, 2018
@vbehar
Copy link
Contributor Author

vbehar commented Oct 1, 2018

Thanks for your review and your good work on Kaniko !

@kumprj
Copy link

kumprj commented Apr 16, 2020

I'm still experiencing this issue in Jenkins @vbehar . Jenkins on a Kubernetes cluster, starting the kaniko container with /busybox/cat. In my pipeline I run most of my job on a linux agent, but want to swap to kaniko container for docker images. Receiving the nohup error. Any advice for how you got it working?

Trying to run even a sh 'ls' returns '/busybox/sh: nohup: not found'

edit: disregard. For anyone who sees this I had to add a withEnv(['PATH+EXTRA=path-from-kaniko-container'])

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.

5 participants