Docker is weird(codeandcake.dev)
864 points by psxuaw 2 days ago | 365 comments
tl;dr: Containers aren't a single Linux feature but a combination of five (namespaces, cgroups, networking, chroot/pivot_root, etc.), and images are essentially just folders that Docker chroots into. Go is a surprisingly awkward choice for runc since many container-related syscalls require a single-threaded context, forcing runc to use a C module before Go's runtime starts and to re-exec /proc/self/exe to fake fork. Docker also traditionally requires root, and rootless setups must reimplement networking in userspace.
HN Discussion:
  • ~Docker's real innovation was Dockerfiles and the registry, not the container tech itself
  • ↑Appreciates the article for demystifying containers by breaking down their building blocks
  • ↑Confirms the article's technical claim that runc's core is actually C, not Go
  • ↓Nothing described is weird; it all makes sense given historical evolution
  • ↑Docker carries legacy cruft; simpler rootless alternatives like Podman are preferable now