From 584427c69430268a0c2806805dc8f8392299a4e4 Mon Sep 17 00:00:00 2001 From: Asko Soukka Date: Thu, 18 Feb 2016 18:16:15 +0200 Subject: [PATCH] dockerTools: Fix issue where image name with repository prefix was not supported --- pkgs/build-support/docker/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 55344aad566f..8e4a51071e33 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -267,7 +267,9 @@ EOF let - baseJson = writeText "${name}-config.json" (builtins.toJSON { + baseName = baseNameOf name; + + baseJson = writeText "${baseName}-config.json" (builtins.toJSON { created = "1970-01-01T00:00:01Z"; architecture = "amd64"; os = "linux"; @@ -277,11 +279,11 @@ EOF layer = (if runAsRoot == null then mkPureLayer { inherit baseJson contents extraCommands; } else mkRootLayer { inherit baseJson fromImage fromImageName fromImageTag contents runAsRoot diskSize extraCommands; }); - depsTarball = mkTarball { name = "${name}-deps"; + depsTarball = mkTarball { name = "${baseName}-deps"; drv = layer; onlyDeps = true; }; - result = runCommand "${name}.tar.gz" { + result = runCommand "${baseName}.tar.gz" { buildInputs = [ jshon ]; imageName = name;