thiagowfx's avatar

Β¬ just serendipity πŸ€ (not just serendipity)

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:

dockerfile
FROM alpine:3.22
RUN apk add --no-cache kubectl

How 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

shell
% dive bitnami/kubectl:latest
% dive rancher/kubectl:v1.30.14

The 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!