nixos docker: fix service and test
This commit is contained in:
parent
af3d395cfe
commit
6c8e6aaa24
|
@ -103,6 +103,9 @@ in
|
|||
LimitNPROC = 1048576;
|
||||
} // proxy_env;
|
||||
|
||||
path = [ pkgs.kmod ];
|
||||
environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
|
||||
|
||||
postStart = ''
|
||||
while ! [ -e /var/run/docker.sock ]; do
|
||||
sleep 0.1
|
||||
|
|
|
@ -15,8 +15,8 @@ import ./make-test.nix {
|
|||
startAll;
|
||||
|
||||
$docker->waitForUnit("docker.service");
|
||||
$docker->succeed("tar cv --files-from /dev/null | docker import - scratch");
|
||||
$docker->succeed("docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratch /bin/sleep 10");
|
||||
$docker->succeed("tar cv --files-from /dev/null | docker import - scratchimg");
|
||||
$docker->succeed("docker run -d --name=sleeping -v /nix/store:/nix/store -v /run/current-system/sw/bin:/bin scratchimg /bin/sleep 10");
|
||||
$docker->succeed("docker ps | grep sleeping");
|
||||
$docker->succeed("docker stop sleeping");
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue