RE: Re: RE: Re: docker cookbook and idempotency

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)

Kevin Keane

The NetTech

http://www.4nettech.com

Our values: Privacy, Liberty, Justice

See https://www.4nettech.com/corp/the-nettech-values.html

-----Original message-----
From: Daniel DeLeo dan@kallistec.com
Sent: Tuesday 1st September 2015 7:30
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: docker cookbook and idempotency

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

action :build_if_missing
end

remote_directory "/tmp/mydockercontext" do

notifies :build, "docker_image[myimage]"
end
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.

Kevin Keane
The NetTech

--
Daniel DeLeo