Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: f40d13666e8a
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: a84a302732e8
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on Sep 21, 2018

  1. 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
    
    (cherry picked from commit a32d7e0)
    graham-at-target authored and grahamc committed Sep 21, 2018
    Copy the full SHA
    0fe015a View commit details
    Browse the repository at this point in the history
  2. dockerTools.buildImage: test that created=now makes an unstable date

    (cherry picked from commit aedc651)
    grahamc committed Sep 21, 2018
    Copy the full SHA
    9eefd1e View commit details
    Browse the repository at this point in the history
  3. Clarfy the binary reproducibility problems of created=now with docker…

    …Tools.buildImage.
    
    (cherry picked from commit 7736337)
    grahamc committed Sep 21, 2018
    Copy the full SHA
    a84a302 View commit details
    Browse the repository at this point in the history