diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2022-12-08 23:54:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-08 23:54:50 +0100 |
commit | 470e6fd1cd2fd9ba0c5f2c2f63b1004a3200fbde (patch) | |
tree | 3d4afe32cd6fdf9b124744999fdd64d820284fd9 /nixos | |
parent | 3071eef957921d10f22cac6e73334efc85421b6b (diff) | |
parent | cf7b358d69e2aaf330fd4219d2b552a250365645 (diff) |
Merge pull request #201902 from ck3mp3r/dockertools-architecture-in-config-200725
Adding ability to set image architecture when creating OCI images using DockerTools
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/docker-tools.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix index e76a46131929..98704ecb2fb6 100644 --- a/nixos/tests/docker-tools.nix +++ b/nixos/tests/docker-tools.nix @@ -419,6 +419,20 @@ import ./make-test-python.nix ({ pkgs, ... }: { "docker rmi layered-image-with-path", ) + with subtest("Ensure correct architecture is present in manifests."): + docker.succeed(""" + docker load --input='${examples.build-image-with-architecture}' + docker inspect build-image-with-architecture \ + | ${pkgs.jq}/bin/jq -er '.[] | select(.Architecture=="arm64").Architecture' + docker rmi build-image-with-architecture + """) + docker.succeed(""" + ${examples.layered-image-with-architecture} | docker load + docker inspect layered-image-with-architecture \ + | ${pkgs.jq}/bin/jq -er '.[] | select(.Architecture=="arm64").Architecture' + docker rmi layered-image-with-architecture + """) + with subtest("etc"): docker.succeed("${examples.etc} | docker load") docker.succeed("docker run --rm etc | grep localhost") |