DEV Community

Discussion on: Let's talk about Docker

Collapse
 
dontlaugh profile image
Coleman McFarland

I'm the notorious Docker-hater at my workplace. I don't like any of it. i don't like the CLI, I don't like Dockerfiles, I don't like how the registries work, I don't like the Docker daemon. It's complexity is unwarranted for 99% of all applications. And it's slow.

Everything about Docker is a lowest-common-denominator choice:

The image format. An OCI image is a tarball of tarballs, plus some json metadata. This is not an improvement on traditional packages. There is no native versioning concept in OCI images, it's just a string, and you're left to figure it all out. Not to mention that building an OCI image with a Dockerfile relies on all the Debians and Alpines and all the other Linux distros putting together an actually working system. OCI images don't really solve the problem of packaging. The format is space-ineffecient and network-inefficient. I'll admit that it is portable, but 90% of everyone's production is some Debian, Ubuntu, or RHEL-variant. In 2022, Linux portability is really freaking easy.

Also: just because Dockerfiles won't let you write inline for-loops, that doesn't make them idempotent.

Forcing all config through the narrow aperture of docker run -e env vars or -v volume mounts is annoying, especially for local dev. Keeping track of UID and GID inside a container is now something we have to do locally - a problem we invented for ourselves out of whole cloth. It's taken a decade for user namespaces to come online and those aren't really widely supported.

There's also this recent Orange Website post, which asked who was running at scale without containers. Hyperscalers like WhatsApp deployed with rsync. Hello? news.ycombinator.com/item?id=30767393

Of course it's early days yet. And "Docker" (or Podman, which I prefer) is not the only way to do containerization on Linux.

All the while, over the past 10 years, VMs also got a LOT faster. And everybody running Docker for mac is using one, every time. You're just denied all the tools (and the learning experience) of getting in there and optimizing things for your use case.

Now, you can even agree with all this and say, "Yeah, it's kinda crappy, but it works and it's widely supported, and my core business isn't deployment scripts. That's Undifferentiated Heavy Lifting (TM)". Is your core business Dockerfiles? That thing that only tars up a chroot and lets you figure out everything else? Maybe that everything else is writing a bunch of yaml, and then writing some bash on top anyway?

I implore everyone reading this to keep an open mind. Just because something is popular doesn't make it the best, or appropriate for you. Learn from the remarkable non-Docker success stories of the past 10 years - right in the middle of peak k8s hype.


Here's some links to videos that demonstrate cool non-Docker containerization stuff:

Collapse
 
heyjtk profile image
JTK

Wow, really really appreciate your response and yeah a lot of great points here

Collapse
 
hseritt profile image
Harlin Seritt

Hear here!

Docker fucking sucks. The more I work with it, the more useless and time suck it appears to be. Some of us however have environments that are absolutely dependent on it and we'll never be able to move away. It is what it is.