skybet / cali

Cali Automation Layout Initialiser
MIT License
32 stars 7 forks source link

change logic to only call PullImage if necessary, and PullImage always pulls #38

Closed wheresalice closed 6 years ago

wheresalice commented 6 years ago

This is my partial solution for #3 .

PullImage now always pulls the image, regardless of whether it already exists.

StartContainer now only calls PullImage if the image does not already exist.

This allows us to call PullImage ourselves whenever we want to ensure a Docker image is up to date.

What's missing from this is an option to always attempt pulling a new version of the image in StartContainer. This can be added in using @lucymhdavies 's global flags code in #3 if desired.

lucymhdavies commented 6 years ago

Looks good. Can you add a little something to CHANGELOG.md, then I'm happy for this to be merged.

I'll release this as v0.1.2. (I'm considering it a bug that a function called PullImage doesn't always pull an image)

lucymhdavies commented 6 years ago

Ooh, GitHub's git conflict resolution tool is pretty useful :)