blog

SEAN K.H. LIAO

skopeo

Ever needed to move a container image somewhere? Or add a new tag? There's always the trusty:

docker pull $src
docker tag $src $dst
docker push $dst

But this is inefficient and requires you to download the entire image and maybe upload it again if it's to a different registry.

Instead, you could use skopeo:

skopeo copy docker://$src docker://$dst

This is a single command and only needs to operate on the image manifests, you can pass image layers between registries directly.

How? docker image manifests support a urls field for retrieving layers from a remote, so you can move images between datacenters without passing it through your own shitty network.