nixosTests.docker-tools: Add image-with-certs

This commit is contained in:
Robert Hensing 2022-09-21 01:00:04 +01:00
parent f140b54916
commit cbb1f39264
2 changed files with 9 additions and 3 deletions

View File

@ -424,5 +424,12 @@ import ./make-test-python.nix ({ pkgs, ... }: {
docker.succeed("docker run --rm etc | grep localhost")
docker.succeed("docker image rm etc:latest")
with subtest("image-with-certs"):
docker.succeed("<${examples.image-with-certs} docker load")
docker.succeed("docker run --rm image-with-certs:latest test -r /etc/ssl/certs/ca-bundle.crt")
docker.succeed("docker run --rm image-with-certs:latest test -r /etc/ssl/certs/ca-certificates.crt")
docker.succeed("docker run --rm image-with-certs:latest test -r /etc/pki/tls/certs/ca-bundle.crt")
docker.succeed("docker image rm image-with-certs:latest")
'';
})

View File

@ -701,19 +701,18 @@ rec {
# ensure that caCertificates builds
image-with-certs = buildImage {
name = "curl";
name = "image-with-certs";
tag = "latest";
copyToRoot = pkgs.buildEnv {
name = "image-with-certs-root";
paths = [
pkgs.curl
pkgs.coreutils
pkgs.dockerTools.caCertificates
];
};
config = {
Entrypoint = [ "/bin/curl" ];
};
};
}