1 # This test checks charliecloud image construction and run
3 import ./make-test-python.nix ({ pkgs, ...} : let
5 dockerfile = pkgs.writeText "Dockerfile" ''
8 RUN touch /etc/passwd /etc/group
13 name = "charliecloud";
14 meta = with pkgs.lib.maintainers; {
15 maintainers = [ bzizou ];
20 environment.systemPackages = [ pkgs.charliecloud ];
21 virtualisation.docker.enable = true;
24 extraGroups = [ "docker" ];
31 host.wait_for_unit("docker.service")
33 'su - alice -c "docker load --input=${pkgs.dockerTools.examples.nix}"'
36 "cp ${dockerfile} /home/alice/Dockerfile"
38 host.succeed('su - alice -c "ch-build -t hello ."')
39 host.succeed('su - alice -c "ch-builder2tar hello /var/tmp"')
40 host.succeed('su - alice -c "ch-tar2dir /var/tmp/hello.tar.gz /var/tmp"')
41 host.succeed('su - alice -c "ch-run /var/tmp/hello -- echo Running_From_Container_OK"')