1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00
nixpkgs/pkgs/build-support
Graham Christensen a32d7e0c74 dockerTools.buildImage: support impure dates
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
2018-09-20 18:26:02 +02:00
..
agda
bintools-wrapper Revert "Merge pull request #44767 from obsidiansystems/wrapper-env-var-path" 2018-08-22 01:14:53 +02:00
build-bazel-package bazel-deps: init at 2018-05-31 (#43018) 2018-07-09 22:38:45 +00:00
build-dotnet-package
build-fhs-userenv reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
build-setupcfg Revert "buildSetupcfg: Include unzip for zip sources." 2018-04-14 20:12:22 -04:00
buildenv
cc-wrapper treewide: cleanup some references to bash 2018-09-04 22:05:02 +00:00
docker dockerTools.buildImage: support impure dates 2018-09-20 18:26:02 +02:00
dotnetbuildhelpers
dotnetenv [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
emacs Fix pname to ename propagation if null 2018-07-27 08:15:46 +02:00
expand-response-params
fetchbower
fetchbzr
fetchcvs bsd: init netbsd & openbsd userland 2018-04-24 14:16:35 -05:00
fetchdarcs pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchdocker Merge branch 'no-toPath' 2018-09-06 08:09:53 -04:00
fetchegg
fetchfossil
fetchgit pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchgitlocal pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchgx
fetchhg pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchipfs
fetchmavenartifact
fetchmtn
fetchnuget pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchpatch fetchpatch: patchutils -> buildPackages.patchutils 2018-08-21 17:21:25 -04:00
fetchrepoproject
fetchs3 pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl fetchurl: add sageupstream mirror 2018-06-30 01:20:44 +02:00
fetchzip
icon-conv-tools
kernel treewide: Remove usage of remaining redundant platform compatability stuff 2018-08-30 17:20:32 -04:00
libredirect
make-desktopitem
make-startupitem
make-symlinks
mkshell
mono-dll-fixer
nix-prefetch-github nix-prefetch-github: init -> 1.3 2018-05-22 20:55:07 +02:00
nuke-references
ocaml
release reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
remove-references-to
rust buildRustCrate: added some edge cases with binaries 2018-09-13 22:00:29 +02:00
setup-hooks makeWrapper: document --set-default 2018-08-24 19:46:16 +02:00
singularity-tools pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
skaware skaware: switch from git repos to tarballs 2018-09-06 11:53:22 +02:00
src-only
substitute
substitute-files
templaterpm
upstream-updater
vm vmTools: update debian repositories to stable Release.xz urls 2018-09-13 11:10:23 +02:00
wrapper-common {bintools,cc}-wrapper: Factor out role accumulation logic 2018-05-07 15:10:45 -04:00
build-maven.nix buildMaven: Check for authenticated attribute 2018-07-25 16:00:52 +02:00
build-pecl.nix
closure-info.nix
dhall-to-nix.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix
trivial-builders.nix lib: ensure directories of linkFarm links exist (#45628) 2018-09-01 14:53:23 +02:00