mcollina / dockerode-build

Build an image using dockerode a tar-fs
MIT License
5 stars 0 forks source link

dockerode-build tries to pull even if image is present #2

Open vincentwoo opened 8 years ago

vincentwoo commented 8 years ago

https://github.com/mcollina/dockerode-build/blob/master/build.js#L75: docker.pull(from, function (err, stream) {

causes problems if you are trying to write new images on a box that does not have pull permission. I build a bunch of images (that descend from each other) on a dumb server then later push them up, but having dockerode-build messes up this flow.

mcollina commented 8 years ago

Really interesting use case. Would you mind sending in a PR? The behavior should be behind a flag, something like pull: 'always', pull: 'ifmissing' or pull: 'public' (the latter only pulls images that are public on the registry). I would stick the default as pull: 'always' for backward compatibility.

vincentwoo commented 8 years ago

Sorry, I probably can't afford the time (I opted to just use JSONStream directly), but I appreciate you getting back to me!