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

Allow/document prioritizing offline images in services #23909

Open
tonistiigi opened this issue Jun 23, 2016 · 4 comments
Open

Allow/document prioritizing offline images in services #23909

tonistiigi opened this issue Jun 23, 2016 · 4 comments

Comments

@tonistiigi
Copy link
Member

tonistiigi commented Jun 23, 2016

#23790 added support for this as an environment variable DOCKER_SERVICE_PREFER_OFFLINE_IMAGE to support our integration tests.

We should figure out if we want to:

  • document this
  • make it configurable in some other way
  • use digest or image IDs to avoid pulling if local image is present.

I'd prefer not to rush this for 1.12 timeframe.

@vdemeester

@vdemeester
Copy link
Member

I'd prefer not to rush this for 1.12 timeframe.

Sounds more than good to me 👼

@thaJeztah
Copy link
Member

use digest or image IDs to avoid pulling if local image is present.

Resolving digests, and pinning services to that digest was implemented in #28173

Now, if an image with the resolved digest is already present locally, no pull is performed;

DEBU[43610] form data: {"EndpointSpec":{},"Mode":{"Replicated":{}},"Name":"web","TaskTemplate":{"ContainerSpec":{"DNSConfig":{},"Image":"nginx:alpine"},"ForceUpdate":0,"Placement":{},"Resources":{"Limits":{},"Reservations":{}},"RestartPolicy":{}},"UpdateConfig":{"FailureAction":"pause","MaxFailureRatio":0,"Parallelism":1}}
DEBU[43610] Increasing token expiration to: 60 seconds
DEBU[43612] pinning image nginx:alpine by digest: nginx:alpine@sha256:5c6be3514a00db611371806c5aeb510dfd285a4b8261c6e5c3323387e396b66b
DEBU[43612] Service r5b6fv0f8t1krul3dg48hw4hd was scaled up from 0 to 1 instances

@tonistiigi should we close this issue, or do you want to document DOCKER_SERVICE_PREFER_OFFLINE_IMAGE ?

@tonistiigi
Copy link
Member Author

@thaJeztah This itself doesn't help for tests. It could only work if we add a digest based busybox to frozen images(can't be done with docker load) and then modify every test to use that reference(seems very easy to break).

@vdemeester vdemeester removed this from the 1.13.0 milestone Mar 28, 2017
@justincormack
Copy link
Contributor

I had no idea this existed. Using an environment variable is a terrible way to set this. If it is going to exist can we have it in a config file please. But it seems something that should not be in the global (especially per daemon) config, but a property of the service.

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