Nix Packages collection
Go to file
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
.github treewide: remove mailing list references 2018-08-23 09:24:44 -07:00
doc dockerTools.buildImage: support impure dates 2018-09-20 18:26:02 +02:00
lib Merge pull request #46336 from Infinisil/overrideExisting 2018-09-18 11:37:30 +01:00
maintainers Update Anderson Torres e-mail info 2018-09-15 14:21:45 -03:00
nixos Merge pull request #46510 from worldofpeace/installer-refactor 2018-09-20 22:55:42 +08:00
pkgs dockerTools.buildImage: support impure dates 2018-09-20 18:26:02 +02:00
.dir-locals.el .dir-locals.el: init 2018-07-06 12:48:43 -04:00
.editorconfig Revert ".version: remove final newline" 2018-04-28 14:23:13 +02:00
.gitattributes gitattributes: disable merge=union in all-packages 2018-03-27 11:03:03 -05:00
.gitignore kde5: consolidate packages into desktops/kde-5 2016-03-01 10:36:00 -06:00
.version 18.09 -> 19.03 2018-09-02 16:45:00 -04:00
COPYING 2018 will be the year of NixOS 2018-01-04 17:59:52 -05:00
default.nix Reference a local copy of the release notes in the 'version too old' warning, plus a redirect to the support links 2018-08-30 09:05:57 -04:00
README.md treewide: remove mailing list references 2018-08-23 09:24:44 -07:00

logo

Code Triagers Badge

Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the Hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:

% git remote add channels https://github.com/NixOS/nixpkgs-channels.git

For stability and maximum binary package support, it is recommended to maintain custom changes on top of one of the channels, e.g. nixos-18.03 for the latest release and nixos-unstable for the latest successful build of master:

% git remote update channels
% git rebase channels/nixos-18.03

For pull-requests, please rebase onto nixpkgs master.

NixOS Linux distribution source code is located inside nixos/ folder.

Communication: