Live data from Hacker News

Run More Stuff in Docker

jonathan.bergknoff.com

11–20 of 293 posts

Re: Run More Stuff in Docker

#11
> On a Mac, there is a major performance hit whenever you do disk IO in a bind mount (i.e. voluming a directory of the host system into the container). Working without bind mounts is extremely limiting. [..] If you’re using Docker on a Mac and you’ve never tried it on Linux, you owe it to yourself to try it on Linux.

Or use named volumes. I'm running a dockerized WordPress dev environment on my MacBook with average TTFB's of 40 ms.

Re: Run More Stuff in Docker

#12

A few years ago I set a goal to minimize the number of applications installed bare-metal on my laptop. Everything is containerized, just as the blog describes. There is some initial overhead, and some extra work associated with maintaining the infrastructure, but overall I can report improved reproducibility (due to an isolated and static environment per app). I use a bash alias for each common application. For examp…

[deleted]

Re: Run More Stuff in Docker

#13
For end user devices, I much prefer Nix/NixOS [1] for this kind of thing.

With Flakes [2] (experimental feature), you get full reproducibility.

The documentation is spotty and there is a considerable learning curve, but I've switched to NixOS on my laptop and desktop early this year and am mostly very happy with it.

That doesn't cover sandboxing though. I would actually agree that sandboxing / restricting applications (Mac OS style) would be sorely needed on Linux desktop.

Flatpak and Snap are trying to do this. A much saner approach than trying to find or maintain up to date, trustworthy Docker files for applications.

[1] https://nixos.org/

[2] https://nixos.wiki/wiki/Flakes

Re: Run More Stuff in Docker

#14
post #10

> If you’re using Docker on a Mac and you’ve never tried it on Linux, you owe it to yourself to try it on Linux. So ultimately the recommendation is to install Linux and use it as my daily driver. But Linux does not run on my machine yet.

And MacOS does? Is this some Apple Silicon humble brag? Cuz that's "Apple doesn't allow developers and enthusiasts to do their thing on their own computer that they purchased" not "Linux doesn't run on my machine".

Apple definitely allows it, but as far as I know Linux doesn’t support it yet. (turn off SIP, couple other things related to the boot process I think)

Re: Run More Stuff in Docker

#15
post #10

> If you’re using Docker on a Mac and you’ve never tried it on Linux, you owe it to yourself to try it on Linux. So ultimately the recommendation is to install Linux and use it as my daily driver. But Linux does not run on my machine yet.

And MacOS does? Is this some Apple Silicon humble brag? Cuz that's "Apple doesn't allow developers and enthusiasts to do their thing on their own computer that they purchased" not "Linux doesn't run on my machine".

OP's point stands. You assigning them with "humblebrag" intentions is on you. It's not unreasonable to think that many people have M1s now, and it will certainly increase over time.

Re: Run More Stuff in Docker

#16
My personal computer doubles as my workstation. I manage my Python virtual environments with virtualenvwrapper, and I install all the other stuff -mostly OpenGL and gamedev related tools- with apt or from source.

Many developers would consider this Ubuntu 20.04 install that I run on a 9 year old computer to be an accident waiting to happen. But I'm finding this Ubuntu release to be extremely stable even at 3000+ packages.

Re: Run More Stuff in Docker

#17
I run most of my apps in containers on my developer workstation as well. Once containers became popular and I noticed that a few of my apps were available as container images on DockerHub, it just made sense from a resource and security point of view. This is the first post I've seen advocating it, but I think it is sage advice for anyone.

Re: Run More Stuff in Docker

#18
post #10

> If you’re using Docker on a Mac and you’ve never tried it on Linux, you owe it to yourself to try it on Linux. So ultimately the recommendation is to install Linux and use it as my daily driver. But Linux does not run on my machine yet.

And MacOS does? Is this some Apple Silicon humble brag? Cuz that's "Apple doesn't allow developers and enthusiasts to do their thing on their own computer that they purchased" not "Linux doesn't run on my machine".

Not even Apple silicon. Linux is not compatible with MBPs since the touchbar models. More because of "Apple doesn't care you want this" (wifi firmware is known-broken) rather than disallowing.

Re: Run More Stuff in Docker

#19

I'm in the same situation: until I figure (if ever) how to use NixOS and control version my OS, I tend to use Docker for any application with lots of dependencies, specially Python related ones

Reach out to me if you want to learn Nix I'm always happy to help people climb the steep learning curve

Re: Run More Stuff in Docker

#20
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.
Post reply on HN