I did not know that has changed! The docker cookbook requires chef 12, so this shouldn’t be an issue. I’m using the latest (client side 12.5)
Our values: Privacy, Liberty, Justice
On Tuesday, September 1, 2015 at 7:25 AM, Kevin Keane Subscription wrote:
RE: [chef] Re: docker cookbook and idempotency
Yeah, I kinda thought that it would be difficult to implement idempotency.
I’m not sure the build_if_missing would work, because of resource ordering. If I understand you correctly, you are suggesting something like this:
docker_image "myimage do
remote_directory “/tmp/mydockercontext” do
notifies :build, "docker_image[myimage]"
But with this order, the docker image would be built before the context is set up.
Reversing the order of the resources would break the notification, because you cannot notify resources that come later in the recipe. Or am I mistaken about that?
That used to be the case a really long time ago, but it’s supported on any version of Chef that you’re likely to be using.