Open nazardubenets opened 7 years ago
The question is, what should be pulled ? All images without <build>
section ? The base images for building images ?
So its semantically different and asymmetrical to docker:push
which pushes only the build images (pulling the images we are building for doesn't make much sense).
Could you please describe briefly your concrete use case where such a feature would help you ?
I meant pulling of all images described in <run>
section without starting containers. At first i thought that if i add skipRun, or skip to <run>
section, it will pull images and will not start containers at the same time.
Is such scenario possible? In this case i can totally exchange scripts with docker commands to docker-maven-plugin.
What about adding a 'dryRun' option to docker:run
which actually would pull all missing images ? Maybe combined with a pullPolicy
with values Always
and IfNotPresent
(similar to Kubernetes) to tune the way how pulling woks.
The only thing left is whether images with <build>
section should be considered, too as they are usually never pulled (but the image just built is reused). Initially I would say we should skip these images for pulling.
@nazardubenets Would this solve your use case ?
Yes. Adding of 'dryRun' suits very nicely. Then how 'pullPolicy' should be combined with 'autoPull' values?
I agree that images from build should be skipped.
It would be nice to have additional goal docke:pull to simply pull images from registry. As i understand that functionality is already present as part of docker:start, and that is useful to have this separately, without starting containers.