diff --git a/lib/beaker-hostgenerator/data.rb b/lib/beaker-hostgenerator/data.rb index 9de00d91..a65512db 100644 --- a/lib/beaker-hostgenerator/data.rb +++ b/lib/beaker-hostgenerator/data.rb @@ -1062,7 +1062,6 @@ def osinfo 'platform' => 'el-8-x86_64', }, :docker => { - 'image' => 'rockylinux:8', 'docker_image_commands' => [ 'cp /bin/true /sbin/agetty', 'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en' @@ -1074,7 +1073,6 @@ def osinfo 'platform' => 'el-9-x86_64', }, :docker => { - 'image' => 'rockylinux:9', 'docker_image_commands' => [ 'cp /bin/true /sbin/agetty', 'yum install -y crontabs initscripts iproute openssl wget which glibc-langpack-en' diff --git a/lib/beaker-hostgenerator/hypervisor/docker.rb b/lib/beaker-hostgenerator/hypervisor/docker.rb index 29e1ab99..be39d4e4 100644 --- a/lib/beaker-hostgenerator/hypervisor/docker.rb +++ b/lib/beaker-hostgenerator/hypervisor/docker.rb @@ -10,9 +10,19 @@ class Docker < BeakerHostGenerator::Hypervisor::Interface def generate_node(node_info, base_config, bhg_version) base_config['docker_cmd'] = ['/sbin/init'] base_config['image'] = node_info['ostype'].sub(/(\d)/, ':\1') - base_config['image'].sub!(/\w+/, 'oraclelinux') if node_info['ostype'] =~ /^oracle/ - base_config['image'].sub!(/(\w+)/, '\1/leap') if node_info['ostype'] =~ /^opensuse/ - base_config['image'].sub!(/(\d{2})/, '\1.') if node_info['ostype'] =~ /^ubuntu/ + case node_info['ostype'] + when /^oracle/ + base_config['image'].sub!(/\w+/, 'oraclelinux') + when /^opensuse/ + base_config['image'].sub!(/(\w+)/, '\1/leap') + when /^ubuntu/ + base_config['image'].sub!(/(\d{2})/, '\1.') + when /^rocky/ + base_config['image'].sub!(/(\w+)/, 'rockylinux') + when /^alma/ + base_config['image'].sub!(/(\w+)/, 'almalinux') + end + if node_info['bits'] == '64' base_config['image'] = "amd64/#{base_config['image']}" end