Howard: “So, you think I’m one of the smarter kids?”
Sheldon: “No, you’re a tool I was using to make my point.”
There’s a basic utility container/tool kit that I’ve used in the past when troubleshooting in a Kubernetes or docker environment which is based on Ubuntu. The Dockerfile is available here if you’d like to build one yourself, or alternatively you can pull the image from Docker Hub here. If you’re wondering why the Dockerfile has some strange commands in, I’m just adjusting the apt tool to pull from a Sydney mirror site.
docker pull mikejmcguire/utilscontainer
It’s a basic Ubuntu image loaded up with various network utilities – wget, curl, ping, nslookup, dig, and ifconfig; and a few other utilities – git, and unzip.
docker run -it mikejmcguire/utilscontainer bash
A basic deployment is all that you will need to run it in a Kubernetes environment.
Given this is a Linux container, it can of course be run on Linux container hosts, whether they be Ubuntu, RHEL etc. However, I did want to make a utility container based on Red Hat’s Universal Base Image (UBI), which is a trimmed down, well, universal base image that you can use for making containerised applications. I used the same basic Dockerfile template but modified for the UBI base image, and microdnf. I needed microdnf instead of yum as I was using the cut-down minimal base image. The new Dockerfile is available here.
I actually built this one a little differently, as I was building it on a RHEL machine (it saved me from logging into the RH repository).
podman build . -t mikejmcguire/rhutilscontainer
I’ve uploaded it to Docker Hub here, so its still easy to pull into a Kubernetes/Docker environment.
docker pull mikejmcguire/rhutilscontainer
It’s functionally the same – the Ubuntu and the RH UBI container, but it was a good exercise in using UBI.