Debug should report CNB_APP_DIR as working directory for buildpacks images #4326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The Cloud Native Buildpacks launcher does a chdir to the directory in the
CNB_APP_DIR
environment variable (defaulting to/workspace
) as the working directory.This change causes the debug transforms to use and report
CNB_APP_DIR
as the image working directory in the Container Debug Configuration value that is serialized out in the pod annotation, and which is used to report on debug container events.(It's surprisingly difficult to set the CNB_APP_DIR — you can't just set it by defining
CNB_APP_DIR=xxx
during the build!)