Skip to content

Instantly share code, notes, and snippets.

@isinyaaa
Created October 30, 2024 17:27
Show Gist options
  • Save isinyaaa/3e03400baff4668313c2f310c11f8328 to your computer and use it in GitHub Desktop.
Save isinyaaa/3e03400baff4668313c2f310c11f8328 to your computer and use it in GitHub Desktop.

Quick dev guide to use local registries on macOS

Inside podman machine ssh

# ip route
default via 192.168.127.1 dev enp0s1 proto dhcp src 192.168.127.2 metric 100
                                                    ^-----------^

Copy the highlighted IP address, then add the following to your /etc/containers/registries.conf file:

[[registry]]
prefix = "localhost:5001"
location = "IP_YOU_JUST_GOT:5001"
insecure = true

Finally, restart the podman machine.

You can test your setup with a mere docker run -p 5001:5000 registry:2 and it should work.

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