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-slim: init at 1.26.1 #76831

Merged
merged 1 commit into from Jan 18, 2020
Merged

docker-slim: init at 1.26.1 #76831

merged 1 commit into from Jan 18, 2020

Conversation

@mbrgm
Copy link
Member

@mbrgm mbrgm commented Jan 2, 2020

This PR is a replacement for #75564.

Besides fixing some issues, which occur due to building inside the nix build
environment, I also added a patch to fix path/casing-related issues until
docker-slim/docker-slim#121 is merged and a new version
is released.

  • 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 nixpkgs-review --run "nixpkgs-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 @

@mbrgm mbrgm changed the title <!-- Nixpkgs has a lot of new incoming Pull Requests, but not enough people to review this constant stream. Even if you aren't a committer, we would appreciate reviews of other PRs, especially simple ones like package updates. Just testing the relevant package/service and leaving a comment saying what you tested, how you tested it and whether it worked would be great. List of open PRs: <https://github.com/NixOS/nixpkgs/pulls>, for more about reviewing contributions: <https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions>. Reviewing isn't mandatory, but it would help out a lot and reduce the average time-to-merge for all of us. Thanks a lot if you do! --> ###### Motivation for this change docker-slim: init at 1.26.1 Jan 2, 2020
@mbrgm mbrgm mentioned this pull request Jan 2, 2020
4 of 10 tasks complete
@mbrgm
Copy link
Member Author

@mbrgm mbrgm commented Jan 2, 2020

@GrahamcOfBorg build docker-slim

@kalbasit
Copy link
Member

@kalbasit kalbasit commented Jan 2, 2020

@mbrgm
Copy link
Member Author

@mbrgm mbrgm commented Jan 2, 2020

@kalbasit Is this also to be applied although this patch was neither co-authored nor based on the other PR? I have no problem about giving credit if applicable, but wouldn't this express facts that are not true?

Edit: @filalex77 Take a look at the PR, I'll leave it up to you to decide. Trying to avoid an argument about this.

@mbrgm
Copy link
Member Author

@mbrgm mbrgm commented Jan 2, 2020

/cc @marsam @Ma27 as you reviewed the other PR before.

@marsam
Copy link
Contributor

@marsam marsam commented Jan 3, 2020

@mbrgm I managed to build it with custom preBuild phase on top of @filalex77's PR https://github.com/marsam/nixpkgs/blob/e6710f5c272a10894d73643a82acd634807dea75/pkgs/tools/misc/docker-slim/default.nix.
Do you mind integrating my changes or do you prefer it if I add them to @filalex77's PR?

@mbrgm
Copy link
Member Author

@mbrgm mbrgm commented Jan 3, 2020

@marsam I like your version better than mine, given you don't apply any patches. You'd still need to wrap the executable on installation; otherwise, docker-slim will try to create its state directory besides the binary (which will be in nix store). I'm going to integrate all of our changes in this PR. This should then also clarify the authorship question :D.

Co-authored-by: Mario Rodas <marsam@users.noreply.github.com>
Co-authored-by: Oleksii Filonenko <brightone@protonmail.com>
@mbrgm mbrgm force-pushed the mbrgm:docker-slim branch from bdaea9d to d2394a4 Jan 3, 2020
@mbrgm
Copy link
Member Author

@mbrgm mbrgm commented Jan 3, 2020

Ok, this should now have everything important in it. Incorporated @marsam's changes, set him and @filalex77 as co-author.

Copy link
Contributor

@Br1ght0ne Br1ght0ne left a comment

diff LGTM
executable shows usage, minified an Alpine container successfully
closing #75564

[4 built, 4 copied (392.0 MiB), 98.5 MiB DL]
https://github.com/NixOS/nixpkgs/pull/76831
1 package built:
docker-slim
@ofborg ofborg bot requested review from Br1ght0ne and marsam Jan 3, 2020
@marsam marsam merged commit 21d0b20 into NixOS:master Jan 18, 2020
15 checks passed
15 checks passed
docker-slim on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
docker-slim on x86_64-linux Success
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@marsam
Copy link
Contributor

@marsam marsam commented Jan 18, 2020

@mbrgm thank you, sorry for the delay

@zimbatm
Copy link
Member

@zimbatm zimbatm commented Feb 13, 2020

I have just seen this by browsing nixpkgs. The purpose of pkgs/build-support is to hold functions that are used to build other things, but docker-slim itself is just a derivation. Can you move it somewhere else like pkgs/applications/virtualization/docker-slim?

@marsam marsam mentioned this pull request Feb 14, 2020
4 of 10 tasks complete
@marsam
Copy link
Contributor

@marsam marsam commented Feb 14, 2020

@zimbatm sorry about that, fixed in #80078

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

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.