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 container_config(action_handler, machine_spec)
      docker_options = machine_spec.reference['docker_options'] || {}
      docker_options = docker_options.dup
      if machine_spec.from_image
        docker_options['base_image'] ||= {}
        docker_options['base_image']['name'] = machine_spec.from_image
      end
      config = stringize_keys(docker_options.delete('container_config') || {})
      image = base_image(action_handler, docker_options.delete('base_image'))
      config['Image'] = image if image
      DockerRunOptions.include_command_line_options_in_container_config(config, docker_options)
    end
def container_config ( action_handler , machine_spec ) docker_options = machine_spec . reference [ 'docker_options' ] || { } docker_options = docker_options . dup if machine_spec . from_image docker_options [ 'base_image' ] ||= { } docker_options [ 'base_image' ] [ 'name' ] = machine_spec . from_image end config = stringize_keys ( docker_options . delete ( 'container_config' ) || { } ) image = base_image ( action_handler , docker_options . delete ( 'base_image' ) ) config [ 'Image' ] = image if image DockerRunOptions . include_command_line_options_in_container_config ( config , docker_options ) 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
# We're going to delete things to make it easier on ourselves, back it up # Bring in from_image # Respect :container_config # Respect :base_image # Respect everything else
action_handler
<not_specific>
machine_spec
<not_specific>