mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
c1eb962516
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
20 lines
693 B
Nix
20 lines
693 B
Nix
{ 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 ];
|
|
}
|