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

Watch without pulling the images? #201

Closed
radarsh opened this issue Jun 11, 2018 · 3 comments
Closed

Watch without pulling the images? #201

radarsh opened this issue Jun 11, 2018 · 3 comments

Comments

@radarsh
Copy link

radarsh commented Jun 11, 2018

I don't know if it's been previously asked or addressed. I would like to know if it's possible for watchtower to find out if an image has changed on the repository without having to download it, possibly using the registry API.

In its current state, watchtower keeps incrementing the pull counts on Docker Hub (which may not be such a big deal) but a more serious problem could be that it may exhaust the bandwidth on a limited bandwidth hosting set up if it downloads the entire image every few minutes.

@lmcnulty4
Copy link

I'd like to know this as well. I don't really know Go but from poking around the source it looks like in the IsContainerStale method first downloads the image and then checks whether to update. Is it not possible to inspect the image without downloading and then download only if it's changed?

@rbq
Copy link

rbq commented Jul 3, 2018

I'd assume that only metadata (and updated layers) will be transferred? If the image is unchanged, the amount of data transferred should be minimal. Just like the second time you run docker pull [image] locally. I actually just tried that and caused 7.4 kB upstream and 29.8 kB downstream traffic. That is like … 320 MB per month and container or so, given a 5 minute interval?

That being said, I landed here because my Docker Hub counter went from 1 to 4000 over a weekend, which is a bit weird. Not sure if it is a Watchtower issue though—maybe instead Docker Hub should not count a pull w/o changes?

@simskij
Copy link
Member

simskij commented May 12, 2019

That's how docker hub works I'm afraid.
I've gone through the client api a bit as well and ImagePull currently seems to be our only option.

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

No branches or pull requests

4 participants