Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature: debug shell #1727

Closed
wants to merge 5 commits into from
Closed

Conversation

kvaps
Copy link
Contributor

@kvaps kvaps commented Aug 22, 2021

Description

This PR adds two new options: --debug and --debug-shell which allow to run interactive shell in case of RUN command failed.
This option might be very useful during the development the Dockerfile. I'm going to implement it's support into kubectl-build plugin.

Live demo:
asciicast

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.

Release Notes

Describe any changes here so maintainer can include it in the release notes, or delete this block.

Examples of user facing changes:
- kaniko adds a new flag `--debug` and `--debug-cmd` to spawn interactive debug shell in case of RUN command failed

@google-cla google-cla bot added the cla: yes CLA signed by all commit authors label Aug 22, 2021
@kvaps kvaps mentioned this pull request Aug 22, 2021
4 tasks
@kvaps kvaps changed the title feat: debug shell Feature: debug shell Aug 22, 2021
@kvaps kvaps marked this pull request as draft August 23, 2021 16:14
pkg/executor/build.go Outdated Show resolved Hide resolved
@kvaps kvaps force-pushed the debug-shell branch 4 times, most recently from 5941588 to 281915b Compare August 23, 2021 22:34
@kvaps kvaps marked this pull request as ready for review August 24, 2021 01:34
@kvaps
Copy link
Contributor Author

kvaps commented Nov 2, 2021

PR rebased to v1.7.0, new docker images with this change prepared:

ghcr.io/kvaps/kaniko-executor:v1.7.0
ghcr.io/kvaps/kaniko-executor:v1.7.0-debug
ghcr.io/kvaps/kaniko-warmer:v1.7.0

source code of fork in master branch:
https://github.com/kvaps/kaniko/

@kvaps kvaps force-pushed the debug-shell branch 11 times, most recently from 3820876 to 2a4217c Compare December 26, 2021 14:56
@tejal29
Copy link
Contributor

tejal29 commented Feb 20, 2022

rebasing with latest master

@gabyx
Copy link
Contributor

gabyx commented Nov 18, 2022

Awespme!

@aaron-prindle
Copy link
Collaborator

@kvaps would you be able to rebase the PR here? Would like to get this in if possible, thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants