To deploy a container registry using Podman, do the following:
Create a registry storage directory.
mkdir -p /root/data
chown -R 1000:1000 /root/data
Start the registry container.
sudo podman run -d --name user_registry \
--restart=always \
-p 3445:5000 \
-v /root/data:/var/lib/registry:Z \
docker.io/library/registry:2
Open firewall port. Allow inbound traffic on port 3445.
sudo firewall-cmd --add-port=3445/tcp --permanent
sudo firewall-cmd --reload
The registry is now accessible at: http://<PUBLIC_IP>:3445/v2/.
To pull an image, tag it for your local registry, and push the changes, do the following:
Pull the image.
podman pull docker.io/library/nginx:1.25.2-alpine-slim
Tag the image. Replace <Public_IP> with your server's Public IP.
podman tag docker.io/library/nginx:1.25.2-alpine-slim <Public_IP>:3445/library/nginx:1.25.2-alpine-slim
Push the image to the registry. Because this is an HTTP registry, disable TLS verification.
podman push <Public_IP>:3445/library/nginx:1.25.2-alpine-slim --tls-verify=false
© Copyright Dell Inc. All Rights Reserved.