Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker examples: Drop unneeded contents list #75778

Merged

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Dec 16, 2019

Motivation for this change

The command being in the configuration is sufficient for the hello package to be included.

[nix-shell:~/projects/github.com/NixOS/nixpkgs]$ nix-build . -A dockerTools.examples.another-layered-image
these derivations will be built:
  /nix/store/9fnl8l0k8y1sg9mz49a67aivl8qhbba1-another-layered-image-granular-docker-layers.drv
  /nix/store/4iynqb80j30ciqhckv9yhh6rhh6ymfa6-docker-image-another-layered-image.tar.gz.drv
building '/nix/store/9fnl8l0k8y1sg9mz49a67aivl8qhbba1-another-layered-image-granular-docker-layers.drv'...
Creating layer #1 for /nix/store/xhpwab5kavygbr1fswawmdyqvmn3wa4i-glibc-2.27
Creating layer #2 for /nix/store/234v87nsmj70i1592h713i6xidfkqyjw-hello-2.10
Creating layer #3 for /nix/store/s37hdf10l0bwd9ik6fnpp4ppsgxmkp8p-another-layered-image-config.json
Creating layer #4 for /nix/store/8h4ab7990pv3yzrfv3q6kpgnx92iv7s3-bulk-layers
Creating layer #5 for /nix/store/mx2zl07020rw7j120p4bkpi5fi3ca4cy-closure
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Finished building layer 'another-layered-image-granular-docker-layers'
building '/nix/store/4iynqb80j30ciqhckv9yhh6rhh6ymfa6-docker-image-another-layered-image.tar.gz.drv'...
Cooking the image...
Finished.
/nix/store/hzq9n2343gl2f92ndpd4nwq972rr04mr-docker-image-another-layered-image.tar.gz

[nix-shell:~/projects/github.com/NixOS/nixpkgs]$  sudo docker load< ./result
[sudo] password for grahamc:
bbfe743ad63d: Loading layer [==================================================>]  10.24kB/10.24kB
f3b058e3822c: Loading layer [==================================================>]  71.68kB/71.68kB
1789b98d50f6: Loading layer [==================================================>]  10.24kB/10.24kB
f5cf65691c2f: Loading layer [==================================================>]  71.68kB/71.68kB
Loaded image: another-layered-image:latest

[nix-shell:~/projects/github.com/NixOS/nixpkgs]$ sudo docker run another-layered-image:latest
Hello, world!
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant