Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Change default differ from apt to file #227

Closed
aaron-prindle opened this issue Apr 25, 2018 · 5 comments
Closed

Change default differ from apt to file #227

aaron-prindle opened this issue Apr 25, 2018 · 5 comments

Comments

@aaron-prindle
Copy link
Collaborator

aaron-prindle commented Apr 25, 2018

Currently container-diff defaults to the apt differ, I think that this is confusing for users as running container-diff diff <image-1> <image-2> will say that there is no difference in the images (referring to no different apt-packages) when in fact files might be different and it isn't obvious that the default is apt for new users.

@dlorenc
Copy link
Contributor

dlorenc commented Apr 27, 2018

The reason we didn't do file by default is that the output can be huge. Not sure what the best approach is.

@nkubala
Copy link
Contributor

nkubala commented Apr 28, 2018

I would be fine removing the default in favor of making the user specify at least one diff type. I agree with @aaron-prindle that defaulting to apt can be confusing but we definitely don't want to default to file, especially for the analyze command

@peter-evans
Copy link
Contributor

It's not merged yet but --type=size might be a good candidate for the default.
See #256

Removing the default altogether, as @nkubala suggested, would also be fine I think.

@peter-evans
Copy link
Contributor

#256 has been merged. What do you think about making it the default? This is what it would look like:

$ container-diff analyze gcr.io/gcp-runtimes/diff-layer-base

-----Size-----

Analysis for gcr.io/gcp-runtimes/diff-layer-base:
IMAGE                                      DIGEST                                                                         SIZE
gcr.io/gcp-runtimes/diff-layer-base        sha256:3327d2f4a099a1aaa530c1cd93453ac0a3556f3eff616e9ec86751a0c8ac3f27        19B
$ container-diff diff gcr.io/gcp-runtimes/diff-layer-base gcr.io/gcp-runtimes/diff-layer-modified

-----Size-----

Image size difference between gcr.io/gcp-runtimes/diff-layer-base and gcr.io/gcp-runtimes/diff-layer-modified:
SIZE1        SIZE2
19B          15B

@nkubala
Copy link
Contributor

nkubala commented Oct 17, 2018

@peter-evans I think it's probably fine, I don't think there's any "right" answer here :) would you like to open a PR?

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

No branches or pull requests

5 participants