dockerTools: add missing mkdir to caCertificates derivation

This commit is contained in:
Ross Light 2022-09-19 18:00:13 -07:00
parent 998f0f7924
commit f140b54916
2 changed files with 19 additions and 0 deletions

View File

@ -794,6 +794,7 @@ rec {
# This provides the ca bundle in common locations
caCertificates = runCommand "ca-certificates" { } ''
mkdir -p $out/etc/ssl/certs $out/etc/pki/tls/certs
# Old NixOS compatibility.
ln -s ${cacert}/etc/ssl/certs/ca-bundle.crt $out/etc/ssl/certs/ca-bundle.crt
# NixOS canonical location + Debian/Ubuntu/Arch/Gentoo compatibility.

View File

@ -698,4 +698,22 @@ rec {
tag = "latest";
contents = [ pkgs.bashInteractive ./test-dummy ];
};
# ensure that caCertificates builds
image-with-certs = buildImage {
name = "curl";
tag = "latest";
copyToRoot = pkgs.buildEnv {
name = "image-with-certs-root";
paths = [
pkgs.curl
pkgs.dockerTools.caCertificates
];
};
config = {
Entrypoint = [ "/bin/curl" ];
};
};
}