Adds the correct behavior for the dockerfile attribute when using git context.#1441
Open
KKonaOG wants to merge 2 commits intocontainers:mainfrom
Open
Adds the correct behavior for the dockerfile attribute when using git context.#1441KKonaOG wants to merge 2 commits intocontainers:mainfrom
KKonaOG wants to merge 2 commits intocontainers:mainfrom
Conversation
a91341b to
42e9e34
Compare
p12tic
reviewed
Apr 22, 2026
| raise OSError(f"Dockerfile not found in {dockerfile}") | ||
| raise OSError(f"Dockerfile not found in {ctx}") | ||
|
|
||
| if is_context_git_url(ctx) and dockerfile: |
Collaborator
There was a problem hiding this comment.
I think it makes sense to reuse if not is_context_git_url(ctx): check above. Remove not to simplify the conditional.
p12tic
requested changes
Apr 22, 2026
Collaborator
p12tic
left a comment
There was a problem hiding this comment.
Looks great. Just a small nit and it's ready to merge.
added 2 commits
April 22, 2026 04:14
… context. Signed-off-by: KKonaOG <kkonaog@weavrstudios.dev> Verify we are using a git context and a dockerfile has been specified. This better targets the new behavior Signed-off-by: KKonaOG <kkonaog@weavrstudios.dev> Add newsfragment Signed-off-by: KKonaOG <kkonaog@weavrstudios.dev> Add unit test Signed-off-by: KKonaOG <kkonaog@weavrstudios.dev>
…ing two is_context_git_url calls Signed-off-by: KKonaOG <kkonaog@weavrstudios.dev>
f012e7a to
678f6f1
Compare
Author
|
I believe that is what you were suggesting! I'll remember to do a sign-off commit eventually haha! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The current implementation of Git remote contexts fails to respect/honor the Dockerfile attribute in the compose file. This fix results in "Dockerfile" being used if the attribute is unset and the value of the dockerfile attribute otherwise. This brings it in-line with docker compose and the intended compose-spec behavior.