Set the time of the HEAD commit as the OCI created field
Apparently it uses `date -Iseconds` to parse, so we can use @ with a timestamp Also it doesn't parse `created` in buildImage, only buildLayeredImage Signed-off-by: morguldir <morguldir@protonmail.com> Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
5015fc7a2c
commit
b303a774d8
1 changed files with 4 additions and 2 deletions
|
@ -194,10 +194,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
mkOciImage = pkgs: package: allocator: tag:
|
mkOciImage = pkgs: package: allocator: tag:
|
||||||
pkgs.dockerTools.buildImage {
|
pkgs.dockerTools.buildLayeredImage {
|
||||||
name = package.pname;
|
name = package.pname;
|
||||||
tag = "${tag}";
|
tag = "${tag}";
|
||||||
copyToRoot = [
|
# Debian makes builds reproducible through using the HEAD commit's date
|
||||||
|
created = "@${toString self.lastModified}";
|
||||||
|
contents = [
|
||||||
pkgs.dockerTools.caCertificates
|
pkgs.dockerTools.caCertificates
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue