summary refs log tree commit diff
path: root/pkgs/build-support/docker/default.nix
diff options
context:
space:
mode:
authorMichael Fellinger <m.fellinger@gmail.com>2017-06-27 22:11:17 +0200
committerGitHub <noreply@github.com>2017-06-27 22:11:17 +0200
commit704e04b108b2051583b2a9a8dcb728b6324170b7 (patch)
tree2dca9d9db31f6507c378964d3bce75c6eb6c9ab6 /pkgs/build-support/docker/default.nix
parent2c30e5e75449729a903112044a2c9171310c6f2c (diff)
downloadnixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.tar
nixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.tar.gz
nixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.tar.bz2
nixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.tar.lz
nixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.tar.xz
nixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.tar.zst
nixpkgs-704e04b108b2051583b2a9a8dcb728b6324170b7.zip
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.
Diffstat (limited to 'pkgs/build-support/docker/default.nix')
-rw-r--r--pkgs/build-support/docker/default.nix4
1 files changed, 3 insertions, 1 deletions
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;