cancel
Showing results for 
Search instead for 
Did you mean: 
rhbofa
Cadet
Cadet
  • 1,728 Views

When to do podman login as sudo for external registry?

Hi,

Can someone please explain when to login to external registry (such as quay.io) usign podman as root. I found both sudo and not sudo podman login been used for skopeo copy.

Please let me know if my question is not clear. 

Thanks

Labels (1)
0 Kudos
3 Replies
flozano
Moderator
Moderator
  • 1,721 Views

If you do "podman login" it works for "skopeo". If you do "sudo podman login" you need "sudo skopeo".

The login operation saves an access token in the user's home folder, so you need to run skopeo as the same user that did podman login.

If you're using a recent system, you should have no need to use sudo for podman and skopeo, but you still can if you wish. Not recent releases of RHEL 7 and 8, Fedora, etc had incomplete support for rootless containers so you can find courses and tutorials that use 'sudo' everytime they invoke podman and skopeo

0 Kudos
rhbofa
Cadet
Cadet
  • 1,710 Views

Thanks for explaing.

In situation where I build images (using podman) and then upload the image to quay, the upload fails if I don't sudo login to quay.

Are you able to explain why is that happening?

 

Regards.

0 Kudos
flozano
Moderator
Moderator
  • 1,707 Views

If you're using RHEL 8.0 or 8.1 you may get this error because of incomplete rootless support. You are forced to do builds and pushes as root. Update your RHEL (or update your container tools if using other distros) and you should be fine.

0 Kudos
Join the discussion
You must log in to join this conversation.