summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2020-11-19 20:41:53 +0100
committerGitHub <noreply@github.com>2020-11-19 20:41:53 +0100
commitc68e739300d551a755e04dcca6fca1f3dbb21421 (patch)
tree5d718d21ac19d6066c5a1f890b296f8b245e75c5 /nixos
parentc81c3c3daff4a96980da2fce2d80a9e57f9db953 (diff)
parent11367b2db107f318c5ca5634a94c85d185f2c498 (diff)
downloadnixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.tar
nixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.tar.gz
nixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.tar.bz2
nixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.tar.lz
nixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.tar.xz
nixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.tar.zst
nixpkgs-c68e739300d551a755e04dcca6fca1f3dbb21421.zip
Merge pull request #104271 from adisbladis/dockertools-cross
dockerTools.buildLayeredImage: Fix cross compilation
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/docker-tools.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix
index c1c41b0fc11..a20a08fc90d 100644
--- a/nixos/tests/docker-tools.nix
+++ b/nixos/tests/docker-tools.nix
@@ -234,5 +234,17 @@ import ./make-test-python.nix ({ pkgs, ... }: {
             "docker run --rm file-in-store nix-store --verify --check-contents",
             "docker run --rm file-in-store |& grep 'some data'",
         )
+
+    with subtest("Ensure cross compiled image can be loaded and has correct arch."):
+        docker.succeed(
+            "docker load --input='${pkgs.dockerTools.examples.cross-aarch64}'",
+        )
+        assert (
+            docker.succeed(
+                "docker inspect ${pkgs.dockerTools.examples.cross-aarch64.imageName} "
+                + "| ${pkgs.jq}/bin/jq -r .[].Architecture"
+            ).strip()
+            == "arm64v8"
+        )
   '';
 })