rhbofa
Cadet
Cadet
  • 125 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
  • 118 Views

Re: When to do podman login as sudo for external registry?

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
Reply
Loading...
rhbofa
Cadet
Cadet
  • 107 Views

Re: When to do podman login as sudo for external registry?

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
Reply
Loading...
flozano
Moderator
Moderator
  • 104 Views

Re: When to do podman login as sudo for external registry?

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
Reply
Loading...
Join the discussion
You must log in to join this conversation.