Jump to content

Docker: Difference between revisions

23 bytes added ,  1 March 2022
m
imported>Asymmetric
(Add section on reproducible image creation dates)
imported>Asymmetric
m (→‎Reproducible image dates: fix date parsing)
Line 36: Line 36:
The manual advises against using <code>created = "now"</code>, as that prevents images from being reproducible.
The manual advises against using <code>created = "now"</code>, as that prevents images from being reproducible.


An [https://christine.website/blog/nix-flakes-2-2022-02-27 alternative], if using flakes, is to do <code>created = self.lastModifiedDate</code>, which uses the commit date, and is therefore reproducible.
An [https://christine.website/blog/nix-flakes-2-2022-02-27 alternative], if using flakes, is to do <code>created = builtins.substring 0 8 self.lastModifiedDate</code>, which uses the commit date, and is therefore reproducible.


== How to calculate the <code>sha256</code> of a pulled image ==
== How to calculate the <code>sha256</code> of a pulled image ==
Anonymous user