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

diffi command to inspect changes on image filesystem #12919

Closed
wants to merge 1 commit into from
Closed

diffi command to inspect changes on image filesystem #12919

wants to merge 1 commit into from

Conversation

ashwinphatak
Copy link

Closes #12641

Signed-off-by: Ashwin Phatak ashwinpphatak@gmail.com

@ashwinphatak
Copy link
Author

#12641

Signed-off-by: Ashwin Phatak <ashwinpphatak@gmail.com>
case archive.ChangeDelete:
kind = "D"
}
fmt.Fprintf(cli.out, "%s %s\n", kind, change.Path)
Copy link

Choose a reason for hiding this comment

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

Hm. Since the change type does not have a size attribute - how could we get the size of the change.
I guess best would be to add it to the struct so we don't have to change the driver protocol.

https://github.com/docker/docker/blob/master/daemon/graphdriver/driver.go#L115

But adding it to the driver doesn't seem to be so easy

https://github.com/docker/docker/blob/master/daemon/graphdriver/aufs/aufs.go#L352

unless we could use this here too for size:

https://github.com/docker/docker/blob/master/daemon/graphdriver/aufs/aufs.go#L328

Copy link
Author

Choose a reason for hiding this comment

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

Do we need the size diff at the level of each change, or only the layer?

DiffSize() should work for layers https://github.com/docker/docker/blob/master/daemon/graphdriver/driver.go#L123

Copy link

Choose a reason for hiding this comment

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

I am personally after the size diff of each change. The user story is to track down changes that enlarge images.

@cpuguy83
Copy link
Member

cpuguy83 commented May 1, 2015

@ashwinphatak can you add closes #12641 to the main/first comment?

@ashwinphatak
Copy link
Author

@cpuguy83 done

@tiborvass
Copy link
Contributor

@ashwinphatak my personal opinion is that I don't want to add another command just for diffing images. But we should also probably not overload diff like we did with inspect that is a hybrid between image_inspect and container_inspect.

I do welcome the feature, but not in this form. Would prefer to close the PR and continue discussion on the issue.

@ashwinphatak
Copy link
Author

Closing the issue as this feature needs more discussion around requirements. See #12641

@tiborvass
Copy link
Contributor

Thanks for your understanding !

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.

[Proposal]: docker diff between image layers
5 participants