Hacker News new | ask | show | jobs
by andrewguy9 2178 days ago
If this slows or stops the use of Docker in local development I’m all for it. Docker for development is a plague on this earth. It burns battery, slows builds, makes fan noise, eats huge amounts of bandwidth/HDD space, makes debugging a nightmare. All for what? It’s marginally better at setting up a self contained dev environment. Oh wait, Docker can’t do that; you also need docker compose.
9 comments

Don't forget the prospect of Electron Apps on ARM Macs.

iOS and iPadOS never had the chance to run Electron-apps given they would be killed by the OS as it would eat up the RAM sideways. 16GB of RAM will still not be enough for it. Maybe it will run just fine, but hardly usable or "Desktop performance" like.

This makes me appreciate the iOS/iPad app compatibility on ARM Macs as a way to escape some apps that don't need to use Electron.

Electron is already compatible with ARM, as Microsoft added support in 2019 to allow targetting ARM64 devices like the Surface Pro X.
If 16GB of memory isn't enough to run a text editor or glorified IRC client, then the problem is probably the horribly bloated software.
They showed Docker for Mac built for ARM during the keynote, and mentioned that they have been working with Docker for when macOS 11 ships, so I doubt that's going to be the case.
Dev environments always end up with drift. That’s just the reality.

Docker is here to stay because it simplifies too many painful things, and now it has industry momentum behind it. Even our mostly non-software-engineer data scientist are shipping their own containers to prod with ease.

Besides, there’s nothing to say you can use both if that’s your preference.

What's your preference instead of Docker? Just run everything on the same host OS? Nix? More conventional VMs? Servers with specific configurations?
When possible I want to run my apps on OSX. It’s not always possible, but usually works.

The scripting environment managers have made big improvements in the past few years. Nvm/virtualenv/rvm give me 90% of the docker value prop with none of the performance impact or debug hassle.

Haskell/clojure/java all seem platform agnostic out of the box.

C/C++ is probably still a hassle with libs being platform specific.

The question is, why docker have that overhead. Virtualizing should not be very resource-intensive nowadays, everything is optimized at CPU level.
It's not that simple as "everything is optimized at CPU level," actually. Virtualization has very different performance impacts on different workloads.
Virtualization has pretty high overhead.

But on the Mac you have to pay the virtualization overhead to run Linux in a VM, then compound the docker overhead on top of that.

On MacBook Pro this is problematic because it eats battery and contributes to thermal problems.

Forgot to mention that disk performance on docker on the Mac is a big deal for building software.

This article shows overhead for a disk heavy workload: https://vivait.co.uk/labs/docker-for-mac-performance-using-n...

He gets 7 second load time natively, but a 56 second load on docker with inconsistent drive link.

docker on mac does indeed suck! but that's because you gotta run linux to run docker. Docker for dev on a linux box? Great stuff!
Docker for Windows is pretty sweet WSL2 is even sweeter.

Microsoft pretty much killed Linux on desktop for anything other than ideological reasons at this point.

Well, Windows forces you to use vs code remote or pay a huge performance penalty in drive performance in wsl 2,that's no little compromise.
>makes fan noise

I couldn't help but chuckle at including this particular gripe in a list of otherwise very impactful downsides of docker. I mean, I hate it when my laptop starts sounding like a jet engine too, but...

Completely agree. In case it's helpful, we're working on a cloud dev environment for Docker that addresses the resource issues by running containers in the cloud instead of locally: http://kelda.io/blimp

Of course, if you can avoid docker for local development, that's definitely easiest in many cases.

*extreme nerd voice: "just use Nix"
The Nix package manager solves the 'single docker container to be my build environment' thing well. nix-shell is significantly nicer to use than docker.

How is it for the docker-compose 'I need x, y, z running' use case? It's not something I need that much, there are various shell.nix hacks I've seen to (e.g.) get Postgres running for Elixir development. They work, but it's not as rich an approach as the rest of Nix.

totally that's a fair question. I've only been using it by building x, y, z separately and it does reduce my build times significantly. I also just love to be able to fetch binaries with absolutely no strings attached. But in terms of orchestration Docker has far easier interface with compose etc. As far as I know, Nix doesn't really have this sort of solution built in but I guess you could write a derivation where you orchestrate different binaries yourself, starting them with some sort of task manager. So far I just build the binaries with Nix and orchestrate them myself on the server
There must be some stuff, because NixOS exists. Whether it can work in a more standalone way I don't know.
Yeah, the thing is that most of us don’t have the patience of figuring out how Nix works , write derivations and stuff.

Docker and Compose look pretty straightforward in comparison, at least for local development.

Nix may not be straightforward to learn, but Docker isn't straightforward to use. Container orchestration is a pain to deal with, for instance.
Most of the problems you listed are because you want to use a laptop to work for some reason. Ewww. Why anyone would want to optimize for working in trains, planes, automobiles, hotel rooms and meetings - I'll never understand.

I've never had any of these problems with my very inexpensive tower computer, which I upgraded to 32gb of RAM and terabytes of disk space, that was probably a third of the cost of your laptop.

> Why anyone would want to optimize for working in trains, planes, automobiles, hotel rooms and meetings - I'll never understand.

It shouldn't take much understanding - many people work almost exclusively in those environments. Consultants, customer engineers, 'digital nomads'.

Then there's the group of us who would rather the (frankly epic) advances in hardware went towards actual visible software performance improvements instead of more layers of waste.

Better yet, why not have the best of both worlds?

I know most devs are hesitant to try anything that's "always online", but remote development apps have really gotten better recently. VSCode with the Remote extension makes doing development on a VPS a breeze, and unless you have a really bad internet connection, you probably won't even notice it's remote. And then you also get the benefits of the VPS having a faster internet connection (faster package downloads, etc), most likely better specs than your laptop for only $10-15/mo, more resiliency, and better security. It also completely solves the whole "my laptop is ARM but my servers are x86" problem that keeps getting talked about.

I use VS Code remote development via SSH to a $5 a month digital ocean server, and it’s so incredibly smooth and easy. You would never know it wasn’t local. I’ve been using Windows for decades so I’m very productive running windows on the desktop, but I prefer to use Linux on the server. VS Code remote over SSH is the perfect combination for me. For someone who loves macOS the situation should be exactly the same, regardless of whether they are on ARM or x86. If you haven’t tried it yet, I highly recommend giving it a try!
> Most of the problems you listed are because you want to use a laptop to work for some reason. Ewww. Why anyone would want to optimize for working in trains, planes, automobiles, hotel rooms and meetings - I'll never understand.

Because a lot of development requires only a couple cores, maybe 8GB of RAM, and a few free GB for the database or dataset (at most, probably a few hundred free MB). If you aren't simulating large networks, doing serious number crunching (HPC-styled or ML), or into graphics heavy development, a laptop is more than enough for most work.

I want to say most, but that's an assumption on my part, but a lot of computing is about encoding business rules that could be done by passing paper around an office or larger complex and making it digital (though obviously not with the speed and reliability that's often wanted or needed). Message passing, filtering, connecting to databases, verifying data integrity, connecting multiple DBs and auto populating them, etc. None of that requires a powerful computer to develop.

Even the embedded work I've done is really just business rules for safety critical systems: If this reaches some temp, send a signal to the pilot, pilot can optionally release halon. If pilot sends "release halon", then release the halon. Nothing about that or the target platform (16MHz processor with memory measured in KB, maybe double-digit MB) required a powerful computer for development considering that the earlier versions were written on, maybe, 386s.

Just because you do things that require lots of RAM, disk space, and fast cores don't assume everyone else needs that. I used to do a lot of graphics work, and the laptop barely did the job. A full tower was what I needed (especially as I wanted to use CUDA and/or OpenCL and move a lot of numeric work associated with it to the GPU). If I were doing machine learning I'd be in that same boat. But I'm not, most of us aren't.

>Why anyone would want to optimize for working in trains, planes, automobiles, hotel rooms and meetings - I'll never understand.

Because being stationary isn't that great for creativity and problem solving.

Additionally, there are whole careers being made on the ability to work while on the move.

Easy, because when one does consulting for Fortune 500 across the globe, it is expected that we code whenever we are while traveling to the next customer meeting on site.

And even when not traveling, we are expected to move across the building and join other teams for collaborative work.

That’s actually a good point. I’m not really sure how I’ve come to expect a laptop for development. At home I use a PC and it’s much faster in almost every way, despite being 4 years older than my laptop.
Can't take my workstation hiking or traveling.