Robert wrote a really nice way to develop projects with Nix/NixOS locally using docker-compose:
We’ve added a bunch of documentation on how to get started and are looking for feedback.
PS: Before 1.0 is released we’ll provide all the options that can be used, as that’s currently hidden.
Question: when I run systemd inside a docker container (i.e.
nixos.useSystemd = true;) will the logs of the container end up in the hosts journal?
If so, will I be able to filter the logs of my container on the host using
Note that it doesn’t work like nixos-containers.
It just runs whole nixos init inside docker containers, so you’ll have to see logs with
arion logs -f and you should see minimal nixos running in there.
Ok thanks. You might consider the tricks that RedHat pulled off to run systemd inside unprivileged docker containers. In particular using runc hooks to register the container with machinctl on the host and another hook (oci-systemd-hook) that does a bunch of things including mounting
/var/log/journal into the container so that the journal entries from inside the container are visible on the host using:
journalctl --machine <container_id>
Nice! Could you open an Issues · hercules-ci/arion · GitHub for future work?