I am attempting to determine find out how to get this fundamental workflow carried out in Docker Desktop for Mac, with Kaniko operating inside a Kubernetes pod:
- Pull a base picture from the native Docker context
- Construct a picture on prime of it with different sources.
- Publish the brand new picture again to Docker within the native context.
with the aim of beginning a brand new pod in Kubernetes that references the picture that was simply created and having Kubernetes launch the pod with that new picture.
We’re already doing this on a full Kubernetes cluster the place Kubelet is configured to tug from an exterior registry by way of an alias cluster.native
so as a substitute of pulling/publishing to Docker, we’re speaking to that registry. He Dockerfile
would appear like:
ARG REGISTRY_HOST=exterior.registry.fqdn
FROM ${REGISTRY_HOST}/path/to/my-base-image:1.0.0
COPY ...
RUN ...
...and so on...
and we publish in exterior.registry.fqdn/path/to/my-new-image:2.0.0
. However the picture title specification for the pod can be cluster.native/path/to/my-new-image:2.0.0
. So in Docker Desktop we would wish to have the ability to set the REGISTRY_HOST construct argument to level to the Docker Desktop context (I believe).
That is primarily so we will take a look at the method regionally, moderately than having to ship helm charts and so on. to a cluster to check the adjustments. Any strategies on how one thing like this might be carried out, maybe with an area registry exterior of Kubernetes and tweaks to kubelet to make it work like the total cluster setup we’re utilizing, can be significantly appreciated.
If anybody has managed to do one thing like this utilizing colima
and kubernetes
I will be glad to check out that resolution as effectively.
Is there a foundation to start out this work or has somebody already solved it?