From 704e04b108b2051583b2a9a8dcb728b6324170b7 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Tue, 27 Jun 2017 22:11:17 +0200 Subject: [PATCH 1/2] dockerTools.buildImage: configurable timestamp This way not all images have to be from 47 years ago, making it much easier to find the one you're looking for. --- pkgs/build-support/docker/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 6bc9b7475e1..a3a4b605a6d 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -380,6 +380,8 @@ rec { runAsRoot ? null, # Size of the virtual machine disk to provision when building the image. diskSize ? 1024, + # Time of creation of the image. + created ? "1970-01-01T00:00:01Z", }: let @@ -387,7 +389,7 @@ rec { # Create a JSON blob of the configuration. Set the date to unix zero. baseJson = writeText "${baseName}-config.json" (builtins.toJSON { - created = "1970-01-01T00:00:01Z"; + created = created; architecture = "amd64"; os = "linux"; config = config; From 54419f301633f1622b966f75dd07dcce2076e569 Mon Sep 17 00:00:00 2001 From: Michael Fellinger Date: Tue, 27 Jun 2017 22:22:08 +0200 Subject: [PATCH 2/2] using inherited instead --- pkgs/build-support/docker/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index a3a4b605a6d..4ebe3c0615d 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -389,10 +389,9 @@ rec { # Create a JSON blob of the configuration. Set the date to unix zero. baseJson = writeText "${baseName}-config.json" (builtins.toJSON { - created = created; + inherit created config; architecture = "amd64"; os = "linux"; - config = config; }); layer =