podman: Docker APIv2 build endpoint bug with X-Registry-Config

Compat build endpoint is not working if user config file ~/.docker/config contains server key like https://index.docker.io/v1/.
It fails with message:

Error response from daemon: failed to parse query parameter 'X-Registry-Config': "n/a": error storing credentials in temporary auth file (server: "https://index.docker.io/v1/", user: "mvasek"): key https://index.docker.io/v1/ contains http[s]:// prefix

This bug was introduced in https://github.com/containers/podman/pull/11028.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 22 (15 by maintainers)

Commits related to this issue

Most upvoted comments

I managed to sort the problem locally by altering ~/.docker/config.json file:

{
  "stackOrchestrator" : "swarm",
  "experimental" : "enabled",
  "credsStore" : "desktop",
  "auths" : {
    "trunk.registry.rdoproject.org" : {
    },
    "registry.redhat.io" : {
      "auth" : "..."
    }
  }
}

What i had to do was to remove all keys under auths that contained a full url, something like "https://index.docker.io/v1/": {} would break podman, which docker has no problem with it.

@matejvasek Can you please be a little bit more explicit? I checked and there is no registry configured inside ~/.config/containers/containers.conf and I have no container-registries.conf file on disk. I suppose there is an implicit one but I was not able to find it on https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md