What does this actually mean and why do they hide it behind a nonsensical term?
What does this actually mean and why do they hide it behind a nonsensical term?
From the Debian based https://github.com/GoogleContainerTools/distroless/blob/main...
Statically compiled applications (Go) that do not require libc can use the gcr.io/distroless/static image, which contains:
- ca-certificates
- A /etc/passwd entry for a root user
- A /tmp directory
- tzdata
Applications that require libc but do not need libssl can use the gcr.io/distroless/base-nossl, which contains all of the packages in gcr.io/distroless/static, and - glibc
Most other applications (and Go apps that require libc/cgo) should start with gcr.io/distroless/base, which contains all of the packages in gcr.io/distroless/static, and - glibc
- libsslBecause of this, I ended up switching to Ubuntu images and doing apt-get dist-upgrade before anything else to try to pick up fixed binaries.
If Ubuntu truly is able to keep an up to date cadence for its distroless images, then I'd definitely want to investigate to see if I should switch.
It means you have to stop treating your containers a little less like VM's and start treating them a bit more like OS processes. For instance, you can't get a shell on one unless you bother installing that shell yourself.
Edit: @mhio That's what I suspected, thank you.
Great in cases where the app is a self-contained Go program only requiring libc, but not useful when you need to apt/yum/dnf install anything.
There are tools like `nsenter` to act on the container namespaces.
https://manpages.debian.org/bookworm/util-linux/nsenter.1.en...
If I wanted to be so specific about what's going into my images I'd probably just build them with nix.
This is interesting, because in large org you ofren have lot of stuff you just want to keep on running with minimal changes.
It's the same logic as frameworks or other building blocks: why leave all these decisions up to individual teams, when everyone should be doing things more or less the same way?
If need to do something custom, you'll know what you're doing and you can do that. Otherwise, use good defaults provided by people who know better than you.
And ideally, you want to keep the cow alive, at least if you fed it artificially.
In real-world cloud environments, logging into the container and expecting to have a complete Unix environment to poke around in just isn't an option. You might not even have the required permissions to do so, as a matter of corporate policy. You need to build observability directly into the application -- or you haven't built a complete cloud application.
This is not objectively better than external observability.
If the "DevOps perspective" requires it, then it's a pointlessly inflexible perspective.
> just isn't an option
You don't get to blame the system when you made the system.
The option is there.
When you got clueless morons who were in a 6 week nodejs bootcamp now "developing" containers, with no one even having the permissions to troubleshoot crashes - that may very well originate from someone trying to get remote code execution - it is absolutely no surprise that hacks, ransomware, infrastructure so brittle that it only doesn't fail because EBS / EKS keeps restarting the pile of dung every minute and infrastructure pieced together from 40 AWS services where one classic EC2 VM would be sufficient are plentiful.
It's not an exact copy of prod, but so far (a few years, and thousands of containers) it hasn't really been an issue as far as I've heard. We don't do anything fancy though. Node, Go, Java and Python apps..
Finding something useful that the distro left lying around but that wasn't part of the plan might feel like a win here and there, it's just as likely to be a win for your adversary as it is for your friend.
Since distroless are lacking all these tools other techniques needs to be used during troubleshooting and debugging.
I think distroless images are great. Less stuff to patch and smaller images.
It doesn't make sense in multiple ways.
"Distro" means "distribution", so "something that is distributed". Aren't "distroless" images being widely distributed?
It seems that "distroless" images are being built from a distribution, and then by removing some of the contents. So you must have a distro first, otherwise you can't have "distroless". That doesn't add up semantically.
If I seed Ubuntu it doesn't become blckoil distro. So the word distro means different from distribution.
A distroless image doesn't include a package manager. You cannot use anything in the provided distroless image to install software.
Some distros come with a lot of stuff. Some with very little.
That it can be used to make another distro has NO BEARING on this. What would you call that thing if it's not a distro? What is that noun?
Not at all. The establishment of a term, and giving it a definition that's widely agreed upon, by definition (heh) makes it not nonsensical.
> "Distro" means "distribution", so "something that is distributed"
No. In the Linux world a distribution means something much more restricted than that. It's a full system that can be installed, complete with a package manager, init system, etc.
"Distroless" simply means it's a minimal set of software and libraries such that it can run a particular binary that you copy into it, but it doesn't act like a distribution. You can't install libraries and programs into the container using a package manager, for example, like you'd be able to if your container held a stock Debian install.
> It seems that "distroless" images are being built from a distribution, and then by removing some of the contents. So you must have a distro first, otherwise you can't have "distroless". That doesn't add up semantically.
I don't see where you're getting that conclusion from. If you take a distro, install it into a container, and then strip away everything that makes it a distro, then it is indeed distroless. How you got there is irrelevant.
You could even build a distroless container without installing the distro into the container first. You could install the distro into a chroot (or into another container) and then selectively copy things out into the target container. Or if you were a masochist, I suppose you could even download source tarballs of everything you wanted in your distroless container, and manually build them on a host system and copy them into the container.
Again, how you get to the final state is irrelevant. The idea is that the final state is runnable, but does not contain all the bits you'd expect to see in an installed distro.
I'm confident saying a linux distro is anything with a linux kernel that you can slap on bare metal or a VM system and get something up and running.
You're merely describing a minimalist/specialized distro, a not particularly new or unique concept.
Of course you can find a way to be upset with the term if you want to, but I think it's in this sense that these container images are distroless.
I share parent's view that it's marketed with the most provocative term to attract attention, where an appropriate name wouldn't have stirred enough controversy to their taste ?
In contrast a "system container" has a regular init system and likely also package management (although that is optional) but was created using a package manager so the miscellaneous package-installed files are usually in there.
The distroless images specifically don't give you a package manager, only specific packages needed for you to run.
Canonical will support that.
It's actually make sense as you don't need package manager or other things (basically distro toolkit) to build and run container image.