News for hackers. Stuff that matters.
Re:The Slippery Slope of Docker Dev Environments by dpc_pw on Sunday February 23, 2020 @08:15PM (#22400800)
Containers are great, but everything else that Docker does is very meh. Slow, inconvenient, hard to work with.

What I'd really want is a system that takes nix files (see Nix & NixOS), and gets that running as a container. Or something like that: Guix or whatever else. Free package-level caching and deduplication, and so on.

Re:The Slippery Slope of Docker Dev Environments by zimbatm on Sunday February 23, 2020 @08:21PM (#22400833)
https://nixery.dev/ does some of this. `docker pull nixery.dev/shell/git/htop` and you get an image built on the fly with bash, git and htop in it. Each loaded in their individual layers.

For a push approach, I am maintaining this project: https://github.com/nix-community/docker-nixpkgs

Both work well for CLI-like applications. What is missing is to get something similar for services where there is a mix of configuration coming from environment variables and files.

Re:The Slippery Slope of Docker Dev Environments by dpc_pw on Sunday February 23, 2020 @10:40PM (#22401455)
Thanks. I will look at this and other comments, but I don't want stuff that involves docker in any way. Only NixOs + containers.
Re:The Slippery Slope of Docker Dev Environments by mikepurvis on Sunday February 23, 2020 @08:25PM (#22400855)
I asked about this a few months ago on here and was pointed to this:

https://grahamc.com/blog/nix-and-layered-docker-images

It's far from a native solution, and is a bit hacky due to the 256 layer limitation in docker, but it's most of the way to what you want, I think.

Re:The Slippery Slope of Docker Dev Environments by ryukafalz on Sunday February 23, 2020 @09:59PM (#22401270)
Guix has that built in, effectively - you can build a Guix operating-system as a container to run on the same system (this shares the host machine's store for deduplication), or a Docker image if you want to ship it to a machine that's not running Guix.

See docker-image and container here: https://guix.gnu.org/manual/en/html_node/Invoking-guix-syste...

Re:The Slippery Slope of Docker Dev Environments by Kaze404 on Sunday February 23, 2020 @08:18PM (#22400819)
Doesn't the NixOS CLI do exactly that with virtual machines?
Re:The Slippery Slope of Docker Dev Environments by servilio on Sunday February 23, 2020 @09:57PM (#22401264)
Yes, the nixos-container command. That's the imperative approach, you can also do it declaratively.

https://nixos.org/nixos/manual/index.html#ch-containers

Re:The Slippery Slope of Docker Dev Environments by servilio on Sunday February 23, 2020 @10:06PM (#22401295)
Have you taken a look at NixOps[1] and Disnix[2]? They extend the concepts of Nix and NixOS into networks of machines and distributed services (TL;DR version).

If you are using only one system, the NixOS containers support might be enough, though.

[1] https://nixos.org/nixops/ [2] https://nixos.org/disnix/

Re:The Slippery Slope of Docker Dev Environments by dpc_pw on Sunday February 23, 2020 @10:44PM (#22401467)
I did used nixops. I quite enjoyed it, though the local state database was annoying. I wish it was more like k8s, keeping its state internally in a distributed db. I'll look into disnix. Thanks!
Re:The Slippery Slope of Docker Dev Environments by servilio on Monday February 24, 2020 @11:14AM (#22405333)
True, are you aware of the following Github issue related to this?

https://github.com/NixOS/nixops/issues/565

It has links to solutions people are using, and other related issues.