orlangure/gnomock

Request: Before pulling the image, check whether the local image exists.

Closed this issue · 2 comments

Describe the bug
panic: can't start container: can't pull image: can't pull image: Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

To Reproduce
Pull the image frequently.

Expected behavior
If the local image exists, do not pull it again.

Hi @shado1111w, thanks for reporting this.

I didn't think anybody would hit the limits, but I like the idea of allowing users to skip image download if possible.

I see you already started implementing this feature in your own fork, would you like to continue working on it until it can be merged here as well? The only thing I would ask is that the default behavior would be "always pull" the image unless there is an explicit intent to use the local one, otherwise the default behavior would change and I think it should be avoided.

You are right.