lib/chef/provisioning/docker_driver/docker_container_machine.rb
# Expects a machine specification, a usable transport and convergence strategy
# Options is expected to contain the optional keys
#   :command => the final command to execute
#   :ports => a list of port numbers to listen on
Expects a machine specification, a usable transport and convergence strategy
Options is expected to contain the optional keys
:command => the final command to execute
:ports => a list of port numbers to listen on
Expects a machine specification a usable transport and convergence strategy Options is expected to contain the optional keys : command = > the final command to execute : ports = > a list of port numbers to listen on
def converge(action_handler)
      transport.container = converge_container_for(machine_spec)
      if !transport.container
        raise "No converge container found! Did you run `:converge` without first running `:setup`?"
      end
      unless transport.container.info['State']['Running']
        action_handler.perform_action "start converge container chef-converge.#{machine_spec.name}" do
          transport.container.start!
        end
      end
      super(action_handler)
      converged_image = commit_converged_image(action_handler, machine_spec, transport.container)
      transport.container = create_container(action_handler, machine_spec, converged_image)
      action_handler.perform_action "start container #{machine_spec.name}" do
        transport.container.start!
      end
    end
def converge ( action_handler ) transport . container = converge_container_for ( machine_spec ) if ! transport . container raise "No converge container found! Did you run `:converge` without first running `:setup`?" end unless transport . container . info [ 'State' ] [ 'Running' ] action_handler . perform_action "start converge container chef-converge.#{machine_spec.name}" do transport . container . start! end end super ( action_handler ) converged_image = commit_converged_image ( action_handler , machine_spec , transport . container ) transport . container = create_container ( action_handler , machine_spec , converged_image ) action_handler . perform_action "start container #{machine_spec.name}" do transport . container . start! end end
Expects a machine specification, a usable transport and convergence strategy
Options is expected to contain the optional keys
:command => the final command to execute
:ports => a list of port numbers to listen on
Expects a machine specification a usable transport and convergence strategy Options is expected to contain the optional keys : command = > the final command to execute : ports = > a list of port numbers to listen on
# First, grab and start the converge container if it's there ... # Then, converge ... # Save the converged image ... # Build the new container # Finally, start it!
action_handler
<not_specific>