You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I mistakenly attempted a docker:push for a non-existent image and I noticed that my build did not fail (even though the docker logs showed an error):
[INFO] DOCKER> ... The push refers to a repository [yespath/motor] (len: 0)
14-May-2015 16:04:10 [ERROR] DOCKER> No such id: yespath/motor
14-May-2015 16:04:10 [INFO] DOCKER> ... The push refers to a repository [yespath/motor] (len: 1)
14-May-2015 16:04:10 [ERROR] DOCKER> No such id: yespath/motor
14-May-2015 16:04:10 [INFO] DOCKER> ... The push refers to a repository [yespath/motor] (len: 1)
14-May-2015 16:04:10 [ERROR] DOCKER> No such id: yespath/motor
14-May-2015 16:04:10 [INFO] DOCKER> ... The push refers to a repository [yespath/motor] (len: 1)
14-May-2015 16:04:10 [ERROR] DOCKER> No such id: yespath/motor
14-May-2015 16:04:10 [INFO] ------------------------------------------------------------------------
14-May-2015 16:04:10 [INFO] BUILD SUCCESS
14-May-2015 16:04:10 [INFO] ------------------------------------------------------------------------
14-May-2015 16:04:10 [INFO] Total time: 22.127 s
14-May-2015 16:04:10 [INFO] Finished at: 2015-05-14T23:04:10+00:00
14-May-2015 16:04:11 [INFO] Final Memory: 16M/185M
14-May-2015 16:04:11 [INFO] ------------------------------------------------------------------------
14-May-2015 16:04:11 Finished task 'Docker deploy' with result: Success
I tried testing the docker remote API directly (both v1.14 and v1.17) and I noticed that it returns a 200 status code in this case:
curl -v -X POST -L --post301 -H "X-Registry-Auth : XXXX" http://localhost:4243/images/doesnotexist/push* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 4243 (#0)> POST /images/doesnotexist/push HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:4243
> Accept: */*> X-Registry-Auth : XXXX
>< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Thu, 14 May 2015 23:43:30 GMT
< Transfer-Encoding: chunked
<
{"status":"The push refers to a repository [doesnotexist] (len: 0)"}
{"errorDetail":{"message":"could not find image: no such id: doesnotexist"},"error":"could not find image: no such id: doesnotexist"}
So it seems that simply examining the response status code is not sufficient to determine if the request was successful or not.
For what it's worth, I think this is kind of a poor API contract. But still, it's disconcerting to see docker errors and a successful build.
The text was updated successfully, but these errors were encountered:
I mistakenly attempted a
docker:push
for a non-existent image and I noticed that my build did not fail (even though the docker logs showed an error):I tried testing the docker remote API directly (both v1.14 and v1.17) and I noticed that it returns a 200 status code in this case:
So it seems that simply examining the response status code is not sufficient to determine if the request was successful or not.
For what it's worth, I think this is kind of a poor API contract. But still, it's disconcerting to see docker errors and a successful build.
The text was updated successfully, but these errors were encountered: