← Back to context

Comment by bijmtir

14 hours ago

Docker was basically a commercialisation of lxc and now we got nspawn going full circle.

This is incorrect.

Docker in its earlier incarnations was based on openvz, which predates lxc. The lxc project was initially a kernel development project: a collection of kernel patches to add container support. The userland tool was just a companion. When it became apparent that these patches would "win" the race to be upstreamed even though openvz was much more mature, we switched our tooling to lxc. The patches matured over time, but the userland tool (what we now know as "lxc") was finicky.

The original open-source release of Docker wrapped lxc for low-level container operations. But it was just too unreliable and we swapped it out for an in-house Go implementation called "libcontainer".

As for "commercializing": Docker was famously bad at commercializing anything, we open sourced so much (maybe too much) and still people complained that we were not open enough.

  • “Docker was famously bad at commercializing anything, we open sourced so much (maybe too much) and still people complained that we were not open enough”

    Developers are a tough market to please, especially when your business revolves around open source software.

    Unless you have an option to do private cloud hosting (like all these databases and other platforms do), it’s incredibly difficult to monetize.

    In the case of docker, I think it’s in the nature of the product that it’s difficult to monetize. Best you can do is enterprise support contracts, but those aren’t good enough to justify all that VC funding.

    • I don't think it's necessarily that difficult to monetize, they just ignored a lot of the needs of enterprise users (rootless, not punching holes in the firewall, not fighting with systemd, private registries) for long enough that other projects (e.g. Podman, Quay) filled the void.

      2 replies →

    • > Docker was famously bad at commercializing anything

      That's because there was never a proper sysadmin on your team to slap some sense in your decisions.

      You've got too opinionated[0], too tied on yourself[1] monster which required too much resources what you can handle alone.

      And your market is not the developers but the companies where whose developers have a daytime jobs: https://news.ycombinator.com/item?id=46739153

      [1] Eg: the syntax to point the image to a specific registry is something... bad. So bad I just abandoned running my own registry, it wasn't worth it.

      PS there is still (AFAIK) no support for a transaction-like image building in Compose. So instead of something like this:

          TRANSACTION START
              RUNBATCH set -eux
              # TODO find a better userspace architecture detection method than querying the kernel
                  arch="$(uname -m)"
                  case "$arch" in \
                      aarch64) gosuArch='arm64' ;
                      x86_64) gosuArch='amd64' ;
                      *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;
                  esac
                  curl -fL -o /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$gosuArch.asc"
                  curl -fL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$gosuArch"
                  export GNUPGHOME="$(mktemp -d)"
                  gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4
                  gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu
                  rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc
                  chmod +x /usr/local/bin/gosu
                  gosu --version
                  gosu nobody true
          TRANSACTION END
      

      people need to write these one-liner abominations:

          RUN set -eux; \
          # TODO find a better userspace architecture detection method than querying the kernel
              arch="$(uname -m)"; \
              case "$arch" in \
                  aarch64) gosuArch='arm64' ;; \
                  x86_64) gosuArch='amd64' ;; \
                  *) echo >&2 "error: unsupported architecture: '$arch'"; exit 1 ;; \
              esac; \
              curl -fL -o /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$gosuArch.asc"; \
              curl -fL -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$gosuArch"; \
              export GNUPGHOME="$(mktemp -d)"; \
              gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
              gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
              rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
              chmod +x /usr/local/bin/gosu; \
              gosu --version; \
              gosu nobody true
      

      EDIT: to add on [1]: https://news.ycombinator.com/item?id=35312087

      8 replies →

  • [flagged]

    • Earlier incarnations of the project (2008-2011) were python based on openvz+aufs, with the very first prototypes (2007-08) wrapping vserver. We started the transition to lxc+aufs in 2011. Open-sourced the lxc wrapper in 2013. Replaced it with libcontainer in... 2014 I believe?

The LXC way of getting an up per container is pretty great - I’m basic bitch with this sort of thing so I assume it’s less of an issue for the experts but really enjoyed the IP per container when I hit it.

  • I always liked lxc for containers. I never understood Docker. Not that I really put a lot of time into trying. These days I don't use either one.

I’m a huge fan of nspawn. Always wanted to use VMs instead of Docker and nspawn feels like a natural choice.

  • Its nice having the flexibility for both system containers and application containers. It does feel though that most people forget that nspawn does both, and that it only can do system containers.

    • Agreed, I briefly forgot it can do both. Thanks for the reminder.

      I went down the rabbit hole of Incus and once I realized it requires the full network aspects to be configured, then I figured using KVM, QEMU, Libvirt was more practical. Then stumbled into nspawn and it was basically ready to go.

      Although, I haven’t done enough research to know if Incus provides certain useful capabilities.

      3 replies →