Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I thought I understood Docker until I saw the BusyBox docker image

Tags:

docker

busybox

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 taken care of for a piece of software. Then I stumbled upon this on DockerHub

https://hub.docker.com/_/busybox/

It's an image for BusyBox, which is a tiny little Linux binary that is meant for embedded systems. Then the top comment says:

Busybox is awesome :) By far the most useful container per byte on the entire registry.

But I don't understand at all why this image exists, which makes me think that I don't actually understand why Docker exists. What is the point of a BusyBox docker image?

like image 276
techgnosis Avatar asked Oct 22 '15 21:10

techgnosis


People also ask

What is Docker BusyBox image?

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc.

Is Alpine based on BusyBox?

Alpine Linux is a small, security-oriented, lightweight Linux distribution based on the musl libc library and BusyBox utilities platform instead of GNU.

Which Docker command is mandatory before pushing the image?

The docker push command takes the name of the image. It will know where to push our Docker image by looking at the image name because the name contains the registry location.


1 Answers

A Busybox docker image is useful if one is building a container for which busybox can fulfill its dependency chain without needing a full Linux distro.

Often, an embedded appliance can consist of nothing but a statically-linked copy of busybox, an init script that mounts procfs, sysfs, &c. with busybox-provided tools, and then the actual application being invoked. With docker setting up the filesystem namespace, even that init script isn't necessarily needed.

like image 73
Charles Duffy Avatar answered Sep 24 '22 13:09

Charles Duffy