From d44b778d10b07f3e2ebcf4527bd63cec219e9df4 Mon Sep 17 00:00:00 2001 From: Antoine Eiche Date: Fri, 6 Jul 2018 16:31:59 +0200 Subject: [PATCH] dockerTools.examples: explicitly set image tag to fix docker-tools tests docker-tools tests load images without specifying any tag value. Docker then uses the image with tag "latest" which doesn't exist anymore since commit 39e678e24e38f1f374eaf5463b424ebdf75df9af. --- pkgs/build-support/docker/examples.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix index ca7f78093794..ec2667310cdd 100644 --- a/pkgs/build-support/docker/examples.nix +++ b/pkgs/build-support/docker/examples.nix @@ -13,6 +13,7 @@ rec { # 1. basic example bash = buildImage { name = "bash"; + tag = "latest"; contents = pkgs.bashInteractive; }; @@ -65,6 +66,7 @@ rec { in buildImage { name = "nginx-container"; + tag = "latest"; contents = pkgs.nginx; runAsRoot = '' @@ -106,6 +108,7 @@ rec { # docker run -it --rm nix nix-store -qR $(nix-build '' -A nix) nix = buildImageWithNixDb { name = "nix"; + tag = "latest"; contents = [ # nix-store uses cat program to display results as specified by # the image env variable NIX_PAGER. @@ -121,6 +124,7 @@ rec { # dockerTools chain. onTopOfPulledImage = buildImage { name = "onTopOfPulledImage"; + tag = "latest"; fromImage = nixFromDockerHub; contents = [ pkgs.hello ]; }; @@ -129,6 +133,7 @@ rec { # See issue #34779 and PR #40947 for details. runAsRootExtraCommands = pkgs.dockerTools.buildImage { name = "runAsRootExtraCommands"; + tag = "latest"; contents = [ pkgs.coreutils ]; # The parens here are to create problematic bash to embed and eval. In case # this is *embedded* into the script (with nix expansion) the initial quotes