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

Pull existing images to update them to new versions #158

Closed
kennu opened this issue Mar 17, 2014 · 15 comments · Fixed by #411
Closed

Pull existing images to update them to new versions #158

kennu opened this issue Mar 17, 2014 · 15 comments · Fixed by #411

Comments

@kennu
Copy link

kennu commented Mar 17, 2014

Apparently there is no way to pull each configured image to update them to latest versions. I frequently do this because I deploy new versions of my apps by pushing new images to a private repository. Currently I have to run "docker pull" manually for each of them.

Could there be a command like:

fig pull [service]

(If there already is a command for this, I missed it while trying to grep the source code and read the docs.)

@aanand
Copy link

aanand commented Mar 17, 2014

I've thought about this too. I think my one worry is that if you're using images you've just built/tagged manually, it'll try to pull them and fail. However, I'm not aware of anyone doing that (I mean, that's what build: /path/to/build/dir is for), so it's probably an edge case.

@kennu
Copy link
Author

kennu commented Mar 17, 2014

In my case, we're running Fig on a cloud server, and the actual images are built by developers on their own computers. I don't know if this is the usual case..

@sherzberg
Copy link

+1

@kennu not sure if its good or not, but this is what we do too. currently I am managing two almost identical fig files. one with build and one with image.

@bfirsh
Copy link

bfirsh commented May 14, 2014

+1 fig pull

@bmorton
Copy link

bmorton commented Jun 23, 2014

+1 for fig pull service or fig update service

Would the maintainers be interested in this if I tried to put something together?

@bfirsh
Copy link

bfirsh commented Jun 23, 2014

@bmorton yeah, that'd be fantastic!

@sublimino
Copy link

fig pull would be fantastic. Currently using this (usual regex caveats apply):

for image in $(sed 's/image: \(.*\)/\1/gp;d' fig.yml); do docker pull $image; done

@schainker-digbil
Copy link

Can fig up automatically get the latest updates for specified images, too? Then we have both manual and "automatic" ways of handling this.

@bfirsh
Copy link

bfirsh commented Aug 4, 2014

@schainker-digbil I agree that "fig up" should always attempt to create a consistent environment, even if it is slower. Related: #12

@aanand
Copy link

aanand commented Aug 4, 2014

I can see auto-pull being a problem when:

  1. there's no internet connection
  2. the internet connection is bad
  3. there's a ton of stuff to download

1 can be worked around by checking for a working connection (or attempting to pull and catching the appropriate error). 2 and 3, I'm less sure about. I don't want to have to wait around to get to work just because someone released a new version of an image I depend on.

It's also worth noting that auto-pull would result in different update semantics for image services than for build services. Even if we automatically build on every invocation of fig up, if there's a cached build then Docker won't attempt to pull the upstream FROM image.

@sublimino
Copy link

I concur with @aanand's cache analogy - docker will never retrieve the latest base image unless the cache is invalidated, and as such doesn't create a consistent environment between caches before/after a given image tag.

Perhaps fig up --pull could transparently invoke fig pull, or notify that the cached :latest does not match the remote?

@d11wtq
Copy link

d11wtq commented Aug 4, 2014

I definitely would not want auto-pull behaviour. Our CI updates the tags in the registry. In the same way I don't want my git master to auto-pull just because a colleague pushed new code while I'm in the middle of something, I don't want my docker containers to mysteriously change the next time I do fig up while in the middle of something. fig pull is nice and explicit and has a nice symmetry with the docker client. fig up --pull would be a fine addition too 👍

@schainker-digbil
Copy link

@aanand: For #2, maybe you could monitor the connection speed while you download and bail out if it's too slow, and then relaunch the "stale" container? For #3, I it depends whether the user cares about a ton of stuff to download or not? In our deployment, we mostly push small changes once the container is up. Good points, though, those last two cases are "non-trivial".

@sublimino @d11wtq what about fig up --pull warns the user :latest doesn't match remote but applies no changes, and a fig up --pull --force to ignore warnings and do apply changes?

@d11wtq
Copy link

d11wtq commented Aug 5, 2014

I think fig up --pull should just blindly pull the most up to date tag without warning, since that's what you're explicitly asking for. It just making it automatic on fig up and fig run that I don't want.

@schainker-digbil
Copy link

@d11wtq +1

lamdor added a commit to Banno/fig that referenced this issue Aug 15, 2014
lamdor added a commit to Banno/fig that referenced this issue Aug 15, 2014
Fixes docker#158

Signed-off-by: Luke Amdor <luke.amdor@gmail.com>
yuval-k pushed a commit to yuval-k/compose that referenced this issue Apr 10, 2015
Fixes docker#158

Signed-off-by: Luke Amdor <luke.amdor@gmail.com>

Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
xulike666 pushed a commit to xulike666/compose that referenced this issue Jan 19, 2017
Add runtimeArgs to pass to shim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants