ko icon indicating copy to clipboard operation
ko copied to clipboard

Handle KO_DOCKER_REPO=ko.local/repo and --bare correctly

Open imjasonh opened this issue 3 years ago • 2 comments

Fixes https://github.com/ko-build/ko/issues/807

cc @developer-guy

See comments in https://github.com/ko-build/ko/issues/807#issuecomment-1243695345 -- uniformly setting base: po.LocalDomain in NewDaemon was fine when we assumed/required that KO_DOCKER_REPO=ko.local would only be used without a repo, but we've since changed that assumption/requirement.

$ KO_DOCKER_REPO=ko.local/foo go run ./ build ./test --bare
...
ko.local/foo:3a28632fcb886b7a4c78be8cd36c34ec47e83f71ff55353e5602873400dca564

Note that this also handles ko.local/foo for other namers:

$ KO_DOCKER_REPO=ko.local/foo go run ./ build ./test --preserve-import-paths
...
ko.local/foo/github.com/google/ko/test:3a28632fcb886b7a4c78be8cd36c34ec47e83f71ff55353e5602873400dca564
KO_DOCKER_REPO=ko.local/foo go run ./ build ./test
...
ko.local/foo/test-46c4b272b3716c422d5ff6dfc7547fa9:3a28632fcb886b7a4c78be8cd36c34ec47e83f71ff55353e5602873400dca564

imjasonh avatar Sep 12 '22 13:09 imjasonh

^ @eddycharly

developer-guy avatar Sep 12 '22 13:09 developer-guy

:partying_face:

eddycharly avatar Sep 12 '22 14:09 eddycharly

it would be good to release ko v0.13.0 that includes that fix ☝️

developer-guy avatar Oct 24 '22 14:10 developer-guy