bflad/chef-docker — pull request #51 by normanjoyner (2014-01-30 02:58:07+00:00)
Title: current_resource attribute matching should also depend on container_name

When attempting to execute action :run on multiple containers, the first docker will run successfully, and subsequent attempts will not perform any action (assuming the first docker started successfully); alternatively the subsequent attempts could also try to start the container if it failed to start originally.

This pull request will make it such that if container_name is defined, current_resource will also match on the container_name when determining container_id, and other attributes. If container_name is omitted, the provider will behave in the same fashion as before. My stack requires the execution of several :run actions with the same image / command / command line params but different container_names; I tested my recipe using this modified provider to ensure each container started successfully. I don't believe this should modify any other actions, although I have not fully tested this assumption.