Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Registry Auth #132

Closed
ahjohannessen opened this issue Aug 26, 2021 · 4 comments · Fixed by #265
Closed

Docker Registry Auth #132

ahjohannessen opened this issue Aug 26, 2021 · 4 comments · Fixed by #265
Assignees

Comments

@ahjohannessen
Copy link

Is it possible to configure a credentials file for podman to use. Similar to how docker auth can be configured:

    config {
        auth {
            config = "/path/to/docker/creds/file"
        }
    }

containing something like:

{
	"auths": {
		"docker.io": {
			"auth": "erfi7sYi89234xJUqaqxgmzcnQ2rRFWM5aJX0EC="
		},
		"quay.io": {
			"auth": "juQAqGmz5eR1ipzx8Evn6KGdw8fEa1w5MWczmgY="
		}
	}
}

podman itself supports --authfile=path and REGISTRY_AUTH_FILE env, it seems.

@towe75
Copy link
Collaborator

towe75 commented Aug 26, 2021

@ahjohannessen please see also issue #71

You can certainly configure the authentication directly on your host. See documentation at https://github.com/containers/image/blob/main/docs/containers-auth.json.5.md

It's for now not possible to manage this file directly from nomad-driver-podman.

@ahjohannessen
Copy link
Author

You can certainly configure the authentication directly on your host.

I was trying to avoid that :/

It's for now not possible to manage this file directly from nomad-driver-podman.

Any plans on updating the auth configuration to allow for a config path like docker?

@jamjon3
Copy link

jamjon3 commented Feb 8, 2022

I was just looking for that as I'm using the docker driver and getting ready to switch over to the podman driver on my RHEL8 systems. I put that in the /opt/nomad/auth folder and just point to it for docker:

  config {
    auth {
      config = "/opt/nomad/auth/registryauth.json"
    }
    volumes {
      enabled      = true
      selinuxlabel = "z"
    }    
  }
}

I'd much rather not put passwords in this file _if_ at all possible.

@shoenig
Copy link
Member

shoenig commented Jun 14, 2023

I think implementing support for creds like the docker driver should be possible now? At least the docker pull API supports identity tokens, https://docs.podman.io/en/latest/_static/api.html#tag/images/operation/ImagePullLibpod

base-64 encoded auth config. Must include the following four values: username, password, email and server address OR simply just an identity token.

I'll take a look into making it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants