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
slimtoolkit/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
10 tasks
@mbrgm
Copy link
Member Author

mbrgm commented Jan 2, 2020

@GrahamcOfBorg build docker-slim

@kalbasit
Copy link
Member

kalbasit commented Jan 2, 2020

You should probably add @filalex77 to the commit message. https://help.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors

@mbrgm
Copy link
Member Author

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 commented Jan 2, 2020

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

@marsam
Copy link
Contributor

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 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
Copy link
Member Author

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
Member

@Br1ght0ne Br1ght0ne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@marsam marsam merged commit 21d0b20 into NixOS:master Jan 18, 2020
@marsam
Copy link
Contributor

marsam commented Jan 18, 2020

@mbrgm thank you, sorry for the delay

@zimbatm
Copy link
Member

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
Copy link
Contributor

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
Development

Successfully merging this pull request may close these issues.

None yet

5 participants