summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstuebinm2021-05-31 16:20:55 +0200
committerstuebinm2021-05-31 16:20:55 +0200
commit90dc63cc998becf832a7aed446a6b68ecbcf3906 (patch)
treeda8988cca979de08d669c72f50d33df8f52f74bf
parent818f7a68df4ca0221107b2d07eb502b16fa6d653 (diff)
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 ...
-rw-r--r--nix-modules/docker-nixos-modules.nix4
1 files 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")) ];
};
}