Class: BeakerHostGenerator::Hypervisor::Docker

Inherits:
Interface
  • Object
show all
Includes:
Data
Defined in:
lib/beaker-hostgenerator/hypervisor/docker.rb

Constant Summary

Constants included from Data

Data::BASE_CONFIG, Data::MAIN_PE_VERSION, Data::PE_TARBALL_SERVER, Data::PE_USE_WIN32

Instance Method Summary collapse

Methods included from Data

base_host_config, generate_osinfo, get_osinfo, get_platform_info, get_platforms, osinfo, osinfo_bhgv1, pe_dir, pe_upgrade_version, pe_version

Methods inherited from Interface

#global_config, #initialize

Constructor Details

This class inherits a constructor from BeakerHostGenerator::Hypervisor::Interface

Instance Method Details

#generate_node(node_info, base_config, bhg_version) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/beaker-hostgenerator/hypervisor/docker.rb', line 10

def generate_node(node_info, base_config, bhg_version)
  base_config['docker_cmd'] = ['/sbin/init']

  ostype = node_info['ostype']

  if (commands = image_commands(ostype))
    base_config['docker_image_commands'] = commands
  end

  base_config['image'] = image(ostype)
  base_config['image'].prepend('amd64/') if
    node_info['bits'] == '64' &&
    !base_config['image'].start_with?('quay.io/') &&
    !base_config['image'].start_with?('opensuse/')

  base_generate_node(node_info, base_config, bhg_version, :docker)
end