docker: dive into images
β’ 159 words β’ 1 min β’ updated
Recently bitnami has pulled the plug off their public docker images offering1.
We are relying on their
bitnami/kubectl image. Now what?
We could build our own, or use another upstream image. Looking at the Docker
Hub catalog, I was pleased to find
rancher/kubectl (backed by SUSE)
there.
This is enough for our needs.
It would have been trivial to build our own image otherwise if needed:
FROM alpine:3.22
RUN apk add --no-cache kubectlHow can we ensure these images are equivalent, for practical purposes?
One way is to use dive to introspect
each of them:
A tool for exploring each layer in a docker image
% dive bitnami/kubectl:latest
% dive rancher/kubectl:v1.30.14The rancher image has 50MB in size and contains only the kubectl binary.
There’s no shell, not even /bin/sh.
The bitnami image has 326MB and contains a bunch of other stuff.
It turns out we will get some (unexpected) efficiency gains out of this migration!