Skip to content

Commit

Permalink
dockerTools: set mtime to epoch by default
Browse files Browse the repository at this point in the history
  • Loading branch information
tomberek committed Sep 25, 2024
1 parent 847b473 commit d0b3364
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/build-helpers/images/dockertools.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ This allows the function to produce reproducible images.
`created` (String; _optional_)
: Specifies the time of creation of the generated image.
This date will be used for the image metadata, and as the default value for `mtime`.
This date will be used for the image metadata.
This should be either a date and time formatted according to [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) or `"now"`, in which case the current date will be used.
:::{.caution}
Expand All @@ -535,7 +535,7 @@ This allows the function to produce reproducible images.
Using `"now"` also means that the generated image will not be reproducible anymore (because the date will always change whenever it's built).
:::
_Default value:_ the same value as `created`.
_Default value:_ `"1970-01-01T00:00:01Z"`.
`uid` (Number; _optional_) []{#dockerTools-buildLayeredImage-arg-uid}
`gid` (Number; _optional_) []{#dockerTools-buildLayeredImage-arg-gid}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/docker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ rec {
, config ? { }
, architecture ? defaultArchitecture
, created ? "1970-01-01T00:00:01Z"
, mtime ? created
, mtime ? "1970-01-01T00:00:01Z"
, uid ? 0
, gid ? 0
, uname ? "root"
Expand Down

0 comments on commit d0b3364

Please sign in to comment.