diff options
author | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-12-01 21:06:16 -0600 |
---|---|---|
committer | Parnell Springmeyer <parnell@digitalmentat.com> | 2017-12-01 21:06:16 -0600 |
commit | c1eb962516abb1ab7900d1f19f423f3a4318b849 (patch) | |
tree | 4d4615478cbd897c3648865ed68c47c1f3a60412 /nixos/tests/hocker-fetchdocker/hello-world-container.nix | |
parent | 25865688a729d15dbb2dc21ebd9fbf74e2cffc4b (diff) | |
download | nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.gz nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.bz2 nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.lz nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.xz nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.tar.zst nixpkgs-c1eb962516abb1ab7900d1f19f423f3a4318b849.zip |
fetchdocker: Integration test exercising hocker and fetchdocker
This change adds a simple integration test exercising the fetchdocker Nix code and hocker utilities for the simple `hello-world` docker container. We exercise: - Fetching the docker image configuration json - Fetching the docker image layers - Building a compositor script - Loading the `hello-world` docker image into docker using the compositor script and `docker load` - Running that loaded container
Diffstat (limited to 'nixos/tests/hocker-fetchdocker/hello-world-container.nix')
-rw-r--r-- | nixos/tests/hocker-fetchdocker/hello-world-container.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/hocker-fetchdocker/hello-world-container.nix b/nixos/tests/hocker-fetchdocker/hello-world-container.nix new file mode 100644 index 00000000000..a127875264e --- /dev/null +++ b/nixos/tests/hocker-fetchdocker/hello-world-container.nix @@ -0,0 +1,19 @@ +{ fetchDockerConfig, fetchDockerLayer, fetchdocker }: +fetchdocker rec { + name = "hello-world"; + registry = "https://registry-1.docker.io/v2/"; + repository = "library"; + imageName = "hello-world"; + tag = "latest"; + imageConfig = fetchDockerConfig { + inherit tag registry repository imageName; + sha256 = "1ivbd23hyindkahzfw4kahgzi6ibzz2ablmgsz6340vc6qr1gagj"; + }; + imageLayers = let + layer0 = fetchDockerLayer { + inherit registry repository imageName; + layerDigest = "ca4f61b1923c10e9eb81228bd46bee1dfba02b9c7dac1844527a734752688ede"; + sha256 = "1plfd194fwvsa921ib3xkhms1yqxxrmx92r2h7myj41wjaqn2kya"; + }; + in [ layer0 ]; + } |