Skip to content

Instantly share code, notes, and snippets.

@isomorphisms
Created November 27, 2019 06:08
Show Gist options
  • Star 33 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save isomorphisms/3114ab86960656a729a6b4653001aae2 to your computer and use it in GitHub Desktop.
Save isomorphisms/3114ab86960656a729a6b4653001aae2 to your computer and use it in GitHub Desktop.
how to pull from docker hub using podman/buildah
On void linux.
Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`.
Change (for me lines 11-12) which say
[registries.search]
registries = []
to
```
[registries.search]
registries = ['docker.io']
```
(drawn from https://www.projectatomic.io/blog/2018/05/podman-tls/)
---------------
Without the above you won't be able to use basic `podman` functions. You might get errors like:
- `Error: unable to pull fedora:28: image name provided is a short name and no search registries are defined in the registries config file.`
- `Error: unable to pull stripe/stripe-cli: image name provided is a short name and no search registries are defined in the registries config file.`
--------
Various documentation (redhat blog entries, `man podman` pages) say that dockerhub is a default, but without this step it's clearly not.
Good luck. Feel free to use the comment box below if you have a github account.
@kaiser62
Copy link

kaiser62 commented Nov 15, 2021

Thanks for this!!

@siroBS
Copy link

siroBS commented Jan 2, 2022

My regards!

@christiaan-janssen
Copy link

Thanks! Just what I needed 👍

@cetooley
Copy link

podman version 3.4.4 has the file but no [registries.search] entry - however there is unqualified-search-registries which seems to have done the trick.

@eddy-geek
Copy link

one-liner:

echo "
[registries.search]
registries = ['docker.io']" | sudo tee -a /etc/containers/registries.conf

@grandrew
Copy link

arch; just added these 2 lines to file and it works

@burritoOverflow
Copy link

Nice. Worked for Ubuntu 22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment