I thought I understood Docker. I understood it as a way to package up software with lots of dependencies..to basically create a little world where absolutely everything is t
In addition to being a convenient base to use for other docker images. Busybox also makes a very convenient initContainer
for kubernetes: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
Say you need something to happen that sets up the pod filesystem before your real container starts running then busybox is great at this..
As a concrete example the official redis
image doesn't run redis as root and so it cannot access the filesystem. If you were running redis with disk backup (in appendonly
mode for example) you would need to open up that disk permission for it.
a valid (though probably hacky) initContainer for a statefulSet of redis might looks something like so:
initContainers:
- name: redis-data-permission-fix
image: busybox
command: ["/bin/chmod", "-R", "777", "/opt/data/redis"]
volumeMounts:
- name: data
mountPath: /opt/data/redis