dockerTools.examples.etc: Make it a reliable test

/etc/hosts is generally also provided by the container runtime.
This commit is contained in:
Robert Hensing 2022-05-30 14:32:14 +02:00
parent 116832edbf
commit 44522c1d59

View File

@ -600,7 +600,7 @@ rec {
pkgs.pkgsModule
../../../nixos/modules/system/etc/etc.nix
];
environment.etc."hosts" = {
environment.etc."some-config-file" = {
text = ''
127.0.0.1 localhost
::1 localhost
@ -619,7 +619,7 @@ rec {
'';
config.Cmd = pkgs.writeScript "etc-cmd" ''
#!${pkgs.busybox}/bin/sh
${pkgs.busybox}/bin/cat /etc/hosts
${pkgs.busybox}/bin/cat /etc/some-config-file
'';
};