Skip to content
Snippets Groups Projects
Commit b303a774 authored by morguldir's avatar morguldir Committed by 🥺
Browse files

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: default avatarmorguldir <morguldir@protonmail.com>
Signed-off-by: default avatarstrawberry <strawberry@puppygock.gay>
parent 5015fc7a
No related branches found
No related tags found
No related merge requests found
...@@ -194,10 +194,12 @@ ...@@ -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 = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment