News for hackers. Stuff that matters.
Re:Uv's killer feature is pulling in local dependencies by PaulHoule on Sunday January 12, 2025 @05:24PM (#42677572)
My experience was that docker was a tool data scientists would use to speedrun the process of finding broken Pythons. For instance we'd inexplicably find a Python had Hungarian as the default charset, etc.

The formula was

   - Docker - Discipline = Chaos
   Docker - Discipline = Chaos
   Docker + Discipline = Order
but

   - Docker + Discipline = Order
If you can write a Dockerfile to install something you can write a bash script. Circa 2006 I was running web servers on both Linux and Windows with hundreds of web sites on them with various databases, etc. It really was simple then as "configure a filesystem path" and "configure a database connection" and I had scripts that could create a site in 30 seconds or so.

Sure today you might have five or six different databases for a site but it's not that different in my mind. Having way too many different versions of things installed is a vice, not a virtue.

Re:Uv's killer feature is pulling in local dependencies by p_l on Sunday January 12, 2025 @06:25PM (#42678119)
Unfortunately sometimes you get to host things not written by you, or which exist for a long time and thus there's a lot of history involved that prevents nice and tidy.

My first production use of kubernetes started out because we put in the entirety of what we had to migrate to new hosting into spreadsheet, with columns for various parts of stack used by the websites, and figured we would go insane trying to pack it up - or we would lose the contract because we would be as expensive as the last company.

Could we package it nicely without docker? Yes, but the effort to package it in docker was smaller than packaging it in a way where it wouldn't conflict on a single host, because the simple script becomes way harder when you need to handle multiple versions of the same package, something that most distro do not support at all (these days I think we could have done it with NixOS, but that's a different kettle of deranged fishes)

And then the complexity of managing the stack was quickly made easier by turning each site into separate artifact (docker container) handled by k8s manifests (especially when it came to dealing with about 1000 domains across those apps).

So, theoretically discipline is enough, practical world is much dirtier though.

Re:Uv's killer feature is pulling in local dependencies by coldtea on Sunday January 12, 2025 @07:50PM (#42678756)
>For instance we'd inexplicably find a Python had Hungarian as the default charset, etc.

Sounds quite explicable: Docker image created by Hungarian devs perhaps?

Re:Uv's killer feature is pulling in local dependencies by PaulHoule on Sunday January 12, 2025 @10:36PM (#42679834)
My understanding is that UTF-8 is the world's charset and that reasonable Hungarians would use that (e.g. I sure don't use us-ascii or iso-latin-1 if I can at all help it. I mean my "better half" reads 中文 so I don't have to and having it all in UTF-8 makes it easy) The other mystery is how the data sci's found it.
Re:Uv's killer feature is pulling in local dependencies by chupasaurus on Monday January 13, 2025 @07:32AM (#42682755)
IIRC there was some widely used image with many derivatives that redefined locale (the one in Docker Library used POSIX since forever).
Re:Uv's killer feature is pulling in local dependencies by macNchz on Sunday January 12, 2025 @09:09PM (#42679285)
> If you can write a Dockerfile to install something you can write a bash script.

Docker is great for making sure that magic bash script that brings the system up actually works again on someone else’s computer or after a big upgrade on your dev machine or whatever.

So many custom build scripts I’ve run into over the years have some kind of unstated dependency on the initial system they were written on, or explicit dependencies on something tricky to install, and as such are really annoying to diagnose later on, especially if they make significant system changes.

Docker is strictly better than a folder full of bash scripts and a Readme.txt. I would have loved having it when I had to operate servers like that with tons of websites running on them. So much nicer to be able to manage dependency upgrades per-site rather than server-wide, invariably causing something to quietly break on one of 200 sites.

Re:Uv's killer feature is pulling in local dependencies by baq on Monday January 13, 2025 @04:04AM (#42681473)
Unspoken libc dependencies are my favorite. Granted, you need to wait a few years after launching the project to feel that pain, but once you’re there, the experience is… unforgettable.

Second best are OpenSSL dependencies. I sincerely hope I won’t have to deal with that again.

Re:Uv's killer feature is pulling in local dependencies by TeMPOraL on Monday January 13, 2025 @07:24AM (#42682706)
> If you can write a Dockerfile to install something you can write a bash script.

The trick isn't installing things, it's uninstalling them. Docker container is isolated in ways your bash script equivalent is not - particularly when first developing it, when you're bound to make an occasional mistake.