3 ms·
Docker came about when lxc was the container interface on Linux. It's hardly user friendly. Doing everything yourself is possible, but again is really only user
by kodah 3y ago
Docker came about when lxc was the container interface on Linux. It's hardly user friendly. Doing everything yourself is possible, but again is really only user friendly for very simple operations. For instance, most users would probably find network name spacing or even uid/gid mapping pretty confusing. These days the images produced are quite different in that Docker now produces OCI compatible images, which makes them run anywhere. lxc on the other hand will produce images that run only on Linux. lxd eventually came around which is a lot more analogous to Docker as an application and outputs OCI compatible images.
- ianlevesque 3y agoI’m confused. If OCI images run anywhere, why does Docker Desktop for windows and mac run virtual machines with a Linux kernel behind the scenes?
- jeroenhd 3y agoMost container images contain binaries that were made to use Linux syscalls for things like I/O and memory management. Windows had an implementation of the Linux kernel interface for this exact purpose (WSL 1) but because of performance and compatibility challenges, they switched to plain virtual machines. These days, virtual machine run with almost 0 overhead anyway, so if you want to run a Linux binary they're a much simpler option than implementing a whole operating system.
- tracker1 3y agoTrue enough... When I have been under Windows, a lot of things still run faster under WSL-Ubuntu than in Windows. Hyper-V is pretty nice, generally speaking, and the WSL tooling over it is pretty great. Makes having Windows as a host OS mostly tolerable. I used to joke that "WSL" was my favorite linux distro. I switched at home FT when I saw ads in my start menu search results that first time. The Edge nags weren't enough, the pre-installed games, etc. But an ad before what I was looking for on my local system, that was too far. I realize it was only a "test" feature, but even that someone wanted to test such a thing sickens me. I've still had to sometimes run under Windows at work. I prefer the M1/M2 macs now, just for silence and battery life, but they don't run Docker nearly as well, at least most of the x86_64 container issues are resolved, and most of what I touch has aarch64 targets.
- kodah 3y agoContainers are a feature of the Linux Kernel as is namespacing, so non-linuxes will always need a VM to run Linux containers. lxc really only covers starting a process as a container with some basic configuration. Later on Docker developed libcontainer which gave it interaction with other namespacing technologies like IPC, network, etc. The interfaces with these other namespacing technologies are not the same across linuxes which is what I mean by "run anywhere".
- flaminHotSpeedo 3y agoOCI defines a spec for container images. Both the Linux and Windows kernels support containers, but the way containers work is by running on the parent kernel (as opposed to traditional/micro VM's or unikernels). So if you want to run a Linux container on windows you need a VM running the Linux kernel to provide the host kernel for the container. The same would be true even on Linux if you needed to use a different kernel for the container than what the parent system is running