-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
@jgsqware @jzelinskie
I can not push local images with tag, even the tag is latest.
[root@clair-1 ~/clair/clairctl-master]$ docker-compose exec clairctl clairctl push -l docker.io/registry:2.5.1 --log-level Debug
2018-02-05 08:34:06.862922 D | config: Using config file: /home/clairctl/clairctl.yml
2018-02-05 08:34:06.863115 I | config: retrieving interface for local IP
2018-02-05 08:34:06.863124 D | config: interface provided, looking for eth0
2018-02-05 08:34:06.863387 D | server: Update local server port from "0" to "45399"
2018-02-05 08:34:06.863400 I | server: Starting Server on 172.18.0.4:45399
2018-02-05 08:34:06.868583 D | dockercli: docker image to save: registry:2.5.1
2018-02-05 08:34:06.868595 D | dockercli: saving in: /tmp/clairctl/registry/blobs
2018-02-05 08:34:09.506264 I | config: retrieving interface for local IP
2018-02-05 08:34:09.506286 D | config: interface provided, looking for eth0
2018-02-05 08:34:09.506441 I | clair: using http://172.18.0.4:45399/local as local url
2018-02-05 08:34:09.506454 I | clair: Pushing Layer 1/5 [aa9d9d620aa9]
2018-02-05 08:34:09.506577 D | clair: Saving aa9d9d620aa919ec1eed39cfe8a9d925c8185a15ec16a3ff17a609dfd81d8030[https://registry-1.docker.io/v2]
2018-02-05 08:34:09.547085 I | clair: adding layer 1/5 [aa9d9d620aa9]: receiving http error: 400
client quit unexpectedly
2018-02-05 08:34:09.547108 C | cmd: pushing image "registry:2.5.1": receiving http error: 400
We can see that dockercli save image to the path /tmp/clairctl/registry/blobs
While from the clairctl logs, we can see that it will check path docker.io/library/registry/blobs
{"Event":"processing layer","Level":"debug","Location":"worker.go:73","Time":"2018-02-05 08:34:09.543307","engine version":3,"format":"Docker","layer":"aa9d9d620aa919ec1eed39cfe8a9d925c8185a15ec16a3ff17a609dfd81d8030","parent layer":"","path":"**http://172.18.0.4:45399/local/docker.io/library/registry/blobs**/aa9d9d620aa919ec1eed39cfe8a9d925c8185a15ec16a3ff17a609dfd81d8030/layer.tar"}
{"Event":"could not download layer: expected 2XX","Level":"warning","Location":"driver.go:135","Time":"2018-02-05 08:34:09.545893","status code":404}
{"Event":"failed to extract data from path","Level":"error","Location":"worker.go:122","Time":"2018-02-05 08:34:09.546014","error":"could not find layer","layer":"aa9d9d620aa919ec1eed39cfe8a9d925c8185a15ec16a3ff17a609dfd81d8030","path":"http://172.18.0.4:45399/local/docker.io/library/registry/blobs/aa9d9d620aa919ec1eed39cfe8a9d925c8185a15ec16a3ff17a609dfd81d8030/layer.tar"}
{"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2018-02-05 08:34:09.546877","elapsed time":3645575,"method":"POST","remote addr":"172.18.0.4:41312","request uri":"/v1/layers","status":"400"}
If i push image without tag, it will push successfully.
If i push image with gcr.io and with tag, such as gcr.io/google-containers/etcd-amd64:3.0.17 , it also push successfully.
I found that push image with tag, the path will be http://172.18.0.4:34694/local/docker.io/library/redis/blobs/*******
While push image without tag, the path will be http://172.18.0.4:39827/local//redis/blobs/******
Could you please help to explain the logical and how to fix this issue?
Metadata
Metadata
Assignees
Labels
No labels