forked from mirrors/nixpkgs
a32d7e0c74
Because dates are an impurity, by default buildImage will use a static date of one second past the UNIX Epoch. This can be a bit frustrating when listing docker images in the CLI: $ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE hello latest 08c791c7846e 48 years ago 25.2MB If you want to trade the purity for a better user experience, you can set created to now. pkgs.dockerTools.buildImage { name = "hello"; tag = "latest"; created = "now"; contents = pkgs.hello; config.Cmd = [ "/bin/hello" ]; } and now the Docker CLI will display a reasonable date and sort the images as expected: $ docker image list REPOSITORY TAG IMAGE ID CREATED SIZE hello latest de2bf4786de6 About a minute ago 25.2MB |
||
---|---|---|
.. | ||
languages-frameworks | ||
old | ||
.gitignore | ||
coding-conventions.xml | ||
configuration.xml | ||
contributing.xml | ||
cross-compilation.xml | ||
default.nix | ||
functions.xml | ||
introduction.chapter.md | ||
Makefile | ||
manual.xml | ||
meta.xml | ||
multiple-output.xml | ||
overlays.xml | ||
overrides.css | ||
package-notes.xml | ||
platform-notes.xml | ||
quick-start.xml | ||
release-notes.xml | ||
reviewing-contributions.xml | ||
shell.nix | ||
shell.section.md | ||
stdenv.xml | ||
style.css | ||
submitting-changes.xml |