by sneak · 4y ago · 0 comments
What is the point, then, of doing all this in docker containers? If you're virtualizing with qemu anyway then why containerize?
I was expecting something like software (non-kvm) emulation in a userspace process in an unprivileged container, or perhaps UML, real brain-in-a-jar stuff.
I don't know how well this deals with caches and so, though.
- Minimal host system requirements as kernel tool chains can be very much a pain to set up correctly. If I want to compile different kernel versions for different architectures this seemed liked a good trade-off. - I wanted to encapsulate every major logic component into a separate instance so working on the individual components does not require building one insanely large image.
Also note this is very much an early prototype and me just experimenting. Nothing is set in stone yet. Things are likely to change along the way.
You're exactly right. Docker does pretty much almost nothing here
For real, dockerizing stuff has become a meme lately
What it (actually) does it simplifying dependencies. But you know, most of the time if you can run docker you can install stuff locally
Docker has a significant performance penalty unless you're running Linux already
Containers solve real problems and are here to stay. Feel free not to use them, but saying they're a meme is just trying to be edgy.
Keep on containerising applications.
Sincerely, a sysadmin that has been fighting conflicting dependency requirements, deprecated packages and major distro upgrades for more than a decade.
What's a meme is creating a container for any minor thing like npm + some js project. Or to run one Go binary.
> a sysadmin
Sure, for the deployment of stuff containers are very good. But you know people were using stuff like chroots before that right?
I don't think I'm deploying this debugging system in a webserver.
You couldn't have picked two more different examples.
Go apps are generally pretty clean statically-linked, native binaries and will be happy to just run from their directory without touching anything else. Containerization is usually unneeded, though if you already have a container ecosystem then they will fit in with no fuss, since the container images are basically glorified tarballs (COPY app/ . RUN foo).
Node.js apps on the other side combine an interpreted language, a messy package management ecosystem, and a fragile and persnickety toolchain that will happily leave dirty stuff in your filesystem and/or your PATH, in order to maximize the risk of dependency-related screwups. Containerization is an absolute godsend for them.
I am backend engineer with a non-JS background and to me that's a a very useful thing. I really don't want to install specific node version, yarn version, etc to run some node/JS application. If I can just docker-compose up that's much easier to me and I know it does not affect anything globally. So removing it after playing around is easy and non-risky.
Nix can build many things, among them whole operating systems on the metal, virtual machine images, and container images (including Docker images).
When you use Nix to generate Docker images and deploy them in production using Docker, Nix is not functioning as an alternative to Docker, but your *.nix file is functioning as an alternative to your Dockerfile.
Defining container images in terms of Nixpkgs rather than via a Dockerfile, and assembling it via Nix rathet than `docker build` does have some advantages.
1. It moves you from mere repeatability in the direction of true reproducibility— it makes your outcomes more predictable and reliable
2. Having the benefit of knowledge of the actual dependencies on the system down to the package (or subpackage) level, Nix knows how to generate minimal images when Docker can't.
Plus there's the prospect of reuse, I guess; an environment you've defined in Nix for building Docker containers is easy to install and debug in other environments, without the extra complexity of Docker and filesystems exports/imports, port forwarding, etc. That can be nice, to be able to easily separate out what you're troubleshooting or learning as you're creating or modifying the image's environment.
But yeah that doesn't mean that pairing Dockerfiles with imperative or convergent configutation management or provisioning tools can't also sometimes work well enough in a given situation.
Ah yes, the famed Windows/macOS kernel developer... :)
(Not that it's not possible of course, I just found it chuckle-worthy within the context of this article)