February 16, 2022

Pushing Images to artifactory or any location of docker environment

Skopeo is a tool for moving container images between different types of container storages. It allows you to copy container images between container registries like docker.io, quay.io, and your internal container registry or different types of storage on your local system.

Below are the steps to push or pull images from artifactory using skopeo instead of docker. Skopeo is just a cli and does not require any service/privilege. No change is needed on the docker or docker-desktop settings also.


Pre-Steps: Install skopeo

brew instal skopeo

Setup proxies if any issue with environment:

export http_proxy=<hostname>:<port>

export https_proxy=<hostname>:<port>

export no_proxy="io,com,org"

Login:

skopeo login --tls-verify=false -u USERNAME <repo-url>

Inspecting a repository

skopeo inspect --config docker://quay.io/podman/stable | json_pp

Copying images

Skopeo can copy container images between various storage mechanisms:

skopeo copy docker://<imagename:latest> docker://<imagename:latest>

ex: skopeo copy docker://registry.access.redhat.com/ubi8-init docker://reg.company.com/ubi-init

skopeo copy docker://registry.fedoraproject.org/fedora:latest  containers-storage:fedora

If any restrictions repo: skopeo copy --override-arch=amd64 --override-os=linux --dest-tls-verify=false docker-daemon:<imagename:latest> docker://<imagename:latest>

Deleting images from a registry:

skopeo delete docker://localhost:5000/<imagename:latest>


Reference:

https://www.redhat.com/en/blog/skopeo-10-released#:~:text=Skopeo%20is%20a%20tool%20for,storage%20on%20your%20local%20system

No comments:

Post a Comment

I'm certainly not an expert, but I'll try my hardest to explain what I do know and research what I don't know.

My Favorite Site's List

#update below script more than 500 posts