Live data from Hacker News

Run More Stuff in Docker

jonathan.bergknoff.com

171–180 of 293 posts

Re: Run More Stuff in Docker

#171

Earlier quoted context omitted.

Depends entirely on how the image is built. You can have a Docker image that contains nothing but the application binaries, but then the question is why use Docker at all.

Isolation and reproducibility

At the end of the day, all the docker images depend on a lot of ./configure && make install, if not a lot of apt-get installs, which are often not reproducible. You don't get reproducibility unless you've done it all the way down the chain.

Re: Run More Stuff in Docker

#173

Earlier quoted context omitted.

Yeah, any Docker file that starts with `apt update; apt dist-upgrade` is an instant fail. You might be interested in this fascinating exploration of attempting to bend Docker into better caching and composition by injecting blocks of Nix packages as individual layers: https://grahamc.com/blog/nix-and-layered-docker-images

I think the base images that are commonly used are just as bad; likely some random snapshot of upstream repositories at arbitrary times. You can refer to the sha256 of base images to avoid things changing, but I've never seen anyone do that. (The advice is "never use 'latest' because that could change out from under you", but other tags are just as mutable, and so that isn't real advice. You can follow the advice and…

In production, the companies I work with certainly do rely on SHA256 checksums to specify the base images.

Re: Run More Stuff in Docker

#174
post #151

Docker is intimately tied to Linux. It it only "cross platform" in that it can use a VM (Mac, WSL2) or flaky compat layers (FreeBSD). If software embraces Docker, it effectively excludes other OSes, like Windows, BSDs, Haiku, Fuschia, etc.

> Docker is intimately tied to Linux. Linux and windows: https://hub.docker.com/_/microsoft-windows

Have you used a windows only container? I've not seen one in the wild, but I might be terribly biased.

Re: Run More Stuff in Docker

#175
post #30

Just some counter arguments to @jbergknoff's well put together page! Docker is the best medium for distributing - A static file is far easier to share / distribute. Cross-platform - You need an arguably complex and unstable Linux interface to run Docker images, cgroups et al Sandboxed - security claims about Docker have always been controversial. Simple Unix/BSD constructs like chroot/jails are far simpler and they a…

> A static file is far easier to share / distribute. Does glibc work with static linking these days? My understanding was that even with statically linked glibc, things tend to break when the host system has a different libc / a sufficiently newer glibc. Also, how do you do OpenGL/Vulkan/etc statically? x11docker handles them more-or-less fine, but I'm fairly certain the GPU gods send you to Tartarus if you start try…

Qubes people do have this issue solved. Wayland too, you have to opt-in to have an application steal all the keystrokes.

As far as security on end user machines goes, there's no reason to use Docker over Podman, except for cases where one needs to run docker in docker, which is a farse in and of itself.

Re: Run More Stuff in Docker

#176
post #23

Earlier quoted context omitted.

That just seems insane to be running black inside a container. Why dont you just configure your environment properly?

Serious question: Why do you believe that to be insane? The Dockerfile for a simple application such as black must be very short (probably 3-4 lines), the alias is probably quite short and the container overhead time is minimal for native docker (the story might be different for things like docker mac). On the other hand, you get some benefits from installing black through docker rather than through the system packag…

This requires you to give your normal user the ability to execute stuff via docker. This means that given the ability to execute code as the user, an attacker can trivially gain root access.

Re: Run More Stuff in Docker

#177

Docker for every application? If you create and maintain the Docker image or Dockerfile for every applucation yourself, you must have plenty of time. If you rely on public images from Docker Hub, you must have plenty of trust in the creators of those images.

You also have to have plenty of trust in the creators of the applications. Using Docker isn't really different, especially when the creators of the applications have also provided the Dockerfiles. What you had before Docker was just as much based on trust.

I have much more trust in the application developers. Thus, I'd trust first party docker images, but repackaged applicaton images would fall out of date more often and remain out of date for longer than most distro packages IMO. And, with distributions, there's a community of maintainers that try to package everything to a standard, with docker, I don't think that's the case.

Re: Run More Stuff in Docker

#178
post #170
post #158

Earlier quoted context omitted.

Fossil here, happily using VMs.

I guess that makes me fossilizing, because this is the direction I think we should really be heading. When I stare at docker long enough I wind up at "why couldn't this be a static binary" or "this would be easier to secure if it was it's own VM".

Many people are basically misusing Docker to work around Python and Ruby dependency problems.

Re: Run More Stuff in Docker

#179

Earlier quoted context omitted.

I had a conversation a couple months ago where some guy was telling me that I should run my personal website using Kubernetes. It’s a static website served with Nginx! I just about lost my mind trying to talk to this guy, and he kept trying to convince me to try Kubernetes for my personal website.

Why even run nginx? My personal website is served out of a private S3 bucket, with CloudFront sitting in front of it. As a former sysadmin, the less actual admin I need to do the better.

You could have other, self-hosted services there. That's my setup: I have self hosted trilium and used to self host matrix. The personal nginx served website was just a cherry on top of the cake.

Re: Run More Stuff in Docker

#180
post #148

Earlier quoted context omitted.

> If you’re running Docker, you’re running Linux As slow as it is some people apparently enjoy running docker from win / mac

Docker needs Linux to work. On Mac/Windows containers run in a Linux virtual machine.

I wouldn't call "running an app in a linux VM on windows", "running linux". As a user, your main interface with your computer is windows, which is what "i'm running windows" means, and obviously "you can use the same kernel features as Docker to sandbox applications yourself" wouldn't work, e.g. you couldn't sandbox photoshop like that.
Post reply on HN