container-diff icon indicating copy to clipboard operation
container-diff copied to clipboard

[bug]: dial tcp: lookup ko.local: no such host

Open developer-guy opened this issue 4 years ago • 0 comments

Expected behavior

Once you build a container image via google/ko with --local flag enabled, you will end up having an image with the ko.local/ prefix. It causes that container-diff thinks that it is a registry host, and tries to fetch it.

Actual behavior

$ docker image list                                                                                                                          ─╯
REPOSITORY                 TAG                                                                IMAGE ID       CREATED          SIZE
scorecard                  latest                                                             27cd54902787   40 minutes ago   36.5MB
catthehacker/ubuntu        act-latest                                                         d0ec3129d673   6 days ago       992MB
ko.local                   0.3.3                                                              72373c2fa718   51 years ago     7.94MB
ko.local                   ef415325cfffd54db50f5544ff01a42d7341732728eebb89f2d11c3d425011ff   72373c2fa718   51 years ago     7.94MB
ko.local                   latest                                                             72373c2fa718   51 years ago     7.94MB
ko.local                   v0                                                                 72373c2fa718   51 years ago     7.94MB
ko.local/hello-world-cli   0.3.3                                                              72373c2fa718   51 years ago     7.94MB
ko.local/hello-world-cli   ef415325cfffd54db50f5544ff01a42d7341732728eebb89f2d11c3d425011ff   72373c2fa718   51 years ago     7.94MB
ko.local/hello-world-cli   latest                                                             72373c2fa718   51 years ago     7.94MB
ko.local/hello-world-cli   v0                                                                 72373c2fa718   51 years ago     7.94MB
ko.local/v3                38eb6f4f9e5810672ced992b6d8eb61e14db2e90434202a71e3fccd94064f04a   5e6981757562   51 years ago     18MB
ko.local/v3                57608ed0e138871fb34c0831907ed7f647d7d342                           5e6981757562   51 years ago     18MB
ko.local/v3                latest                                                             5e6981757562   51 years ago     18MB
ko.local/v3                v3.0.1-3-g57608ed-dirty                                            5e6981757562   51 years ago     18MB

$  container-diff diff scorecard:latest ko.local/v3:latest 
ERRO[0010] error retrieving image scorecard:latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/scorecard Type:repository]]
error retrieving image ko.local/v3:latest: retrieving remote image: Get "http://ko.local/v2/": dial tcp: lookup ko.local: no such host

Information

  • container-diff version: 0.17.0 built from git (unknown)
  • Operating system: Darwin C02DM1U3MD6R 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64

Steps to reproduce the behavior

  1. build some Go project with google/ko with the --local flag enabled
  2. try it with container-diff

developer-guy avatar Oct 15 '21 13:10 developer-guy