Top
Best
New

Posted by psxuaw 9 hours ago

Docker is weird(codeandcake.dev)
434 points | 206 commentspage 3
izecube 1 hour ago|
interesting read as a relatively less experienced developer.
mcapodici 5 hours ago||
Docker question. Who prefers docker for local dev vs. run the thing directly. I usually prefer run the thing for debugging and hot reloading. Sure: build the containers and test them in CI. Dependencies like PG sure run in containers as they change less often and you save the install.
jlhawn 2 hours ago|
some people do all of their software development in a container. It really only works well if you are comfortable using TUIs instead of desktop apps though.
razighter777 5 hours ago||
This only scratches the tip of the iceberg. People's minds are blown when they realize Linux has no concept of a container.

It's not a vm: It's all namespaces, baby! Unshare one or more of your mnt, pid, net, ipc, uts, user, cgroup, or time namespaces and you have a "container".

aldousd666 4 hours ago||
Oh man, what a fun thing to do! I may have to replace what used to be my fascination with programming languages and compilers with virtualization or containerization now.
adrianlee_dev 6 hours ago||
This is a better way to understand it: we can think of a container as an isolated process. When deploying containers, having a clear understanding of the boundaries between containers and the host machine in terms of permissions, resources, and data is extremely helpful for troubleshooting issues.
alikatyc 5 hours ago||
I can't use Docker locally only because lack of enough space on my SSD.
andreygrehov 4 hours ago|
That's the case for Range - https://getrange.sh/ - runs any OCI image without pulling it. HTTP range requests FTW! :)
bmacho 48 minutes ago||
Off: both Firefox and Chromium gives F1-F8 to websites to use if they ask nicely.
thayne 6 hours ago||
Today, I would definitely choose rust over go. And I lament that so much container software uses go rather than rust. But back when docker started rust was a lot less mature and probably wouldn't have been a good choice.
vbezhenar 6 hours ago||
C was and is a good choice for that kind of software. I don't understand the prevalence of Go in these tools.
crote 5 hours ago||
Easy: far few footguns.

Performance is basically irrelevant because you're not really interacting with the running application. You're running as root, so security-critical. You're talking to the internet for things like fetching images. You need rather complicated business logic to deal with all the possible options, protocols, and file formats.

Sure, you could do it in C, but dealing with dependencies is a major PITA and you're permanently one tiny mistake away from getting pwned, while not needing any of C's strengths. Go is safe, easy to write, and ships as a single batteries-included binary: what's not to like?

vbezhenar 5 hours ago||
What's not to like? For example the fact that Go's threads and OS threads are two different things. For example the fact that I can't just use fork in Go. And many other things.

Go is good for writing web servers. For system software? Not so much. 90% of Unix is written with C. It's not that bad.

WindyTree 5 hours ago|||
Go has grown too, since 1.25 it knows it’s in a container, uses all cores on CPU for go routines without hiccup.
thayne 5 hours ago||
That isn't really relevant for the tool starting the container. The biggest problem with go here is that it can't natively perform the operations necessary to set up a container, due to the nature of the runtime, so it has to resort to complicated workarounds like a shim in c, and starting spawning from /proc/self/exe instead of forking/cloning.
Copenjin 3 hours ago||
CTRL+F "rust"
znpy 49 minutes ago||
> docker requires root!

Podman has not required root in years, just saying.

q2dg 2 hours ago||
Just use Podman
dilyevsky 2 hours ago|
> Unlike metal servers, VMs are just operating systems being gaslit by a hypervisor. Your actual CPU is still executing those instructions! And if you know where to look, yyou can even read the other VMs’ memory in L1D
More comments...