Currently, our CI/CD Environment is cloud based in Kubernetes. Kubernetes Cloud Providers recently removed the docker deamon, due to performance advantages. For example Google Kubernetes Engine or IBM Cloud Kubernetes only feature an Containerd runtime, to run but not build container images.
Many tools like kaniko or jib fix this gap. They provide a way to build docker images very effectivly without requiring a docker deamon.
Here comes the Problem:
So Image "registry-x.com/repo/app1:v1-snapshot" needs to be tagged from "registry-x.com/repo/app1:v1-snapshot" to "registry-x.com/web/app1:v1-release" and then it needs additionally to be tagged with "registry-y.com/web/app1:v1-release" and both need to be pushed.
Outcome: The Snapshot image from development is available in both registries with a release tag.
So how to do these simple 3 operations (Pull, Tag, Push) without a docker deamon? Seems like kaniko and jib are not a way.
I dont want to order an VM only to get a docker deamon to do these operations. And I also know that Jib is capable of pushing to multiple registries. But it is not able to just rename images.
Relates also to this Question from last year: Clone an image from a docker registry to another
Regards, Leon
Docker Registry provides an HTTP API, so you could those methods to pull and push images.
There are several libraries providing an higher abstraction layer over it (docker-registry-client in Go, docker-registry-client in Js, etc).
In any case, the flow will be
Pulling an image involves:
registry-x.com/repo/app1:v1-snapshot
.Pushing an image involves: