X Tutup
Skip to content

docker-java doesn't work 'out of the box' with v2 registries #506

@llamahunter

Description

@llamahunter

There's some hacky looking code in AbstrDockerCmdExec.registryConfigs() that uses the dockerClientConfig version to decide whether or not to wrap the X-Registry-Config header base64 encoded json in a 'configs' subobject or not. If the version is greater or equal to v1.19, it doesn't wrap, otherwise, it does. Apparently, the v1.19 remote api is being used as a proxy for whether or not the registry api is v2 or v1, and the v2 api doesn't want the 'configs' wrapper.

However, the default remote api version for the library is UNKNOWN_VERSION, and so this fails 'out of the box' when you have a v2 registry. You have to explicitly set the remote api version to some v1.19+ value for things to work. If docker-java is several layers down the software stack from you, this is a royal pain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup