docker-library / busybox

Docker Official Image packaging for Busybox
http://busybox.net
388 stars 126 forks source link

Consider single (standalone) applets variants #176

Open 0xF4CED opened 1 year ago

0xF4CED commented 1 year ago

Consider adding alternative variants that have all applets built as standalone binaries.(make_single_applets.sh). This would be great for building Docker images FROM scratch. It would allow users to selectively consume only the necessary tools, such as nslookup (~65K), for specific purposes like e.g. a HEALTHCHECK. For example: COPY --from=docker.io/busybox:musl-single /bin/nslookup /bin/

tianon commented 1 year ago

Oh, interesting idea!

For your use case, it would only really make sense to support the uclibc variants because they're the only ones that are actually statically compiled (and thus would run successfully inside FROM scratch or any arbitrary image), but that's still interesting IMO! :+1:

0xF4CED commented 1 year ago

Oh okay, I was under the impression, that only the glibc variant wasn't statically compiled. Just uclibc would be sufficient, though.