Skip to content

Support podman $HOME/.config/containers/auth.json as an alternative to $HOME/.docker/config.json for auth credentials #1223

@mshannongit

Description

@mshannongit

Many enterprise environments no longer support the use of docker, and instead use podman.

Running the gradlew dockerBuild action against a private artifactory results in the error -

"unable to retrieve auth token: invalid username/password: unknown: Authentication is required"

This becomes confusing, as one assumes if logged in to podman (via podman login), that the necessary credentials should be available.

However the gradle docker plugin does not know of the podman equivalent auth file to that of Docker's config.json.

One way to solve the problem is to create a symbolic link

mkdir -p $HOME/.docker
ln -s $HOME/.config/containers/auth.json $HOME/.docker/config.json

It would be preferrable however if the gradle docker plugin had native support for locating podman's auth.json file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions