From 90dc63cc998becf832a7aed446a6b68ecbcf3906 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Mon, 31 May 2021 16:20:55 +0200 Subject: nixos-modules oci container: keep to the spec turns out you can break the image spec in subtle ways and instead of telling anyone about it, docker will just guess what was meant and do whatever. podman won't, and actually keeps to the spec. it should work with both now ... --- nix-modules/docker-nixos-modules.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix-modules/docker-nixos-modules.nix b/nix-modules/docker-nixos-modules.nix index d14144d..4f7c93d 100644 --- a/nix-modules/docker-nixos-modules.nix +++ b/nix-modules/docker-nixos-modules.nix @@ -68,7 +68,7 @@ in pkgs.dockerTools.buildImage { # Note that many features of the systemd.services config # are just ignored (e.g. no auto-restarts yet) config = with pkgs.lib; with pkgs.lib.strings; dockerConfig // { - Cmd = pkgs.writeScript "main-entrypoint" + Cmd = [ (pkgs.writeScript "main-entrypoint" ("#!${pkgs.dash.outPath}/bin/dash\n" + concatStrings (map (command: "${command}&\n") (mapAttrsToList @@ -103,6 +103,6 @@ in pkgs.dockerTools.buildImage { then service.script else service.serviceConfig.ExecStart} '').outPath) - config.config.systemd.services)) + "\n wait"); + config.config.systemd.services)) + "\n wait")) ]; }; } -- cgit v1.2.3