pierone
pierone copied to clipboard
Implement Docker Registry V2 error JSON
The stupid Docker client will not honor any standard HTTP status code (e.g. 401/403 will just result in "< nil >" printed by the Docker client) --- we need to implement the proprietary Docker error response objects (https://docs.docker.com/registry/spec/api/#errors-2) to get "proper" error messages on the console.
Example of "< nil >" when pushing without a valid OAuth token:
docker push pierone.example.org/myteam/myapp:0.2.1
The push refers to a repository [pierone.example.org/myteam/myapp] (len: 1)
68b46070c8ad: Preparing
<nil>
:+1:
:+1:
See also https://github.com/docker/docker/issues/18569