Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

pull_platform is not checking if image exists #138

Closed
shomodj opened this issue Feb 6, 2018 · 2 comments · Fixed by #173
Closed

pull_platform is not checking if image exists #138

shomodj opened this issue Feb 6, 2018 · 2 comments · Fixed by #173

Comments

@shomodj
Copy link

shomodj commented Feb 6, 2018

please change this

      def pull_platform_image
        debug "driver - pulling #{chef_image} #{repo(platform_image)} #{tag(platform_image)}"
        pull_image platform_image
      end

to

      def pull_platform_image
        debug "driver - pulling #{chef_image} #{repo(platform_image)} #{tag(platform_image)}"
        pull_if_missing platform_image
      end

thanks

@andyregan
Copy link

@someara First up, thank you for dokken. This project rocks!

I need to use a platform image from a repository that requires credentials but ran into #126 . Previously to this change, I could pull the image before running kitchen create. Since the image existed, pull_if_missing was satisfied. However, now my kitchen create always fails since pull_image always tries to pull and fails on repo authentication.

I'd like to submit a PR, but I don't have the background on why pull_image platform_image was added a few months ago via c146106 . Any reasons against switching back to pull_if_missing platform_image?

Thanks again!

@majormoses
Copy link
Contributor

As I pointed out here #139 (comment) that is not a good security stance I would support config or a cli argument to modify but the default should be to pull the base platform images as they will almost always contain security updates. I realize that the current behavior impacts some workflows but I think those are considered a minority of use cases and we should be secure by default and allow people to opt-in to the behavior described.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants