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

podman login with different mandatory parameter than docker login #5146

Closed
loibpet opened this issue Feb 10, 2020 · 4 comments · Fixed by #5233
Closed

podman login with different mandatory parameter than docker login #5146

loibpet opened this issue Feb 10, 2020 · 4 comments · Fixed by #5233
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@loibpet
Copy link

loibpet commented Feb 10, 2020

/kind bug

Description

Ran into this problem, when I was checking if scripts developed for docker were running with podman.

podman supposed to be compatible to docker in terms of parameters. However, there are still breaking differences:

docker --version && docker login --help

Docker version 1.13.1, build 07f3374/1.13.1

Usage:  docker login [OPTIONS] [SERVER]

Log in to a Docker registry

Options:
      --help              Print usage
  -p, --password string   Password
  -u, --username string   Username

whereas:

podman --version && podman login --help

podman version 1.8.0

Login to a container registry

Description:
  Login to a container registry on a specified server.

Usage:
  podman login [flags] REGISTRY

Examples:
  podman login -u testuser -p testpassword localhost:5000
  podman login -u testuser -p testpassword localhost:5000
  podman login --authfile authdir/myauths.json quay.io

Flags:
      --authfile string   Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override
      --cert-dir string   Pathname of a directory containing TLS certificates and keys used to connect to the registry
      --get-login         Return the current login user for the registry (default true)
  -p, --password string   Password for registry
      --password-stdin    Take the password from stdin
      --tls-verify        Require HTTPS and verify certificates when contacting registries (default true)
  -u, --username string   Username for registry

The issue the mandatory parameter (REGISTRY) for the podman command. This breaks any compatibility.

Describe the results you expected:

No additional mandatory parameter for parameter inherited from docker.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 10, 2020
@rhatdan
Copy link
Member

rhatdan commented Feb 10, 2020

Well Docker is only supporting one registry Docker.io. We could do similar and only support the first registry in registries.conf. I am not crazy about hard coding docker.io into podman login.

@loibpet
Copy link
Author

loibpet commented Feb 10, 2020

This is exactly what we do. We change the registries.conf to point to an internal registry. This is where we push then our images with the scripts.

@rhatdan
Copy link
Member

rhatdan commented Feb 10, 2020

Ok, we can default to the first registry in registries.conf if it does not exist.
Would you be interested in opening a PR for this?

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Feb 10, 2020
QiWang19 added a commit to QiWang19/podman that referenced this issue Feb 17, 2020
fix containers#5146
Insted of using a registry as mandatory parameter, this path allows podman to use the first registry from registries.conf.

Signed-off-by: Qi Wang <qiwan@redhat.com>
QiWang19 added a commit to QiWang19/podman that referenced this issue Feb 17, 2020
fix containers#5146
Insted of using a registry as mandatory parameter, this path allows podman to use the first registry from registries.conf.

Signed-off-by: Qi Wang <qiwan@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Feb 18, 2020

As soon as #5233 gets merged this issue will close.

QiWang19 added a commit to QiWang19/podman that referenced this issue Feb 18, 2020
fix containers#5146
Insted of using a registry as mandatory parameter, this path allows podman to use the first registry from registries.conf.

Signed-off-by: Qi Wang <qiwan@redhat.com>
QiWang19 added a commit to QiWang19/podman that referenced this issue Feb 18, 2020
fix containers#5146
Insted of using a registry as mandatory parameter, this path allows podman to use the first registry from registries.conf.

Signed-off-by: Qi Wang <qiwan@redhat.com>
QiWang19 added a commit to QiWang19/podman that referenced this issue Feb 18, 2020
fix containers#5146
Insted of using a registry as mandatory parameter, this path allows podman to use the first registry from registries.conf.

Signed-off-by: Qi Wang <qiwan@redhat.com>
snj33v pushed a commit to snj33v/libpod that referenced this issue May 31, 2020
fix containers#5146
Insted of using a registry as mandatory parameter, this path allows podman to use the first registry from registries.conf.

Signed-off-by: Qi Wang <qiwan@redhat.com>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants