Add default dockerfile path to skaffold config when using skaffold init #4989
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.
Fixes #3766
Description
This PR is meant to address users who run
skaffold init
and are given the wrong context field in their skaffold config for docker artifacts. Currently the analyzer simply sets the context as the dockerfile location, but this may be different from the actual root of the project's source code.Given a project structure like so:
Before, a user running
skaffold init
would get something like this:Now, they will get something like
This will allow users to more easily alter the necessary fields of their config to work for their project, as mentioned in #3766
Follow-up Work
The issue at the root of this is really #3760. I'd like to list this as follow up work as tackling this issue will create a much better
skaffold init
experience by reducing the need for modification of the config after the fact.