Skip to content

Commit

Permalink
Merge pull request #265 from bastelfreak/alma
Browse files Browse the repository at this point in the history
AlmaLinux: Fix docker image names
  • Loading branch information
bastelfreak authored Dec 14, 2022
2 parents d0372c6 + 8f25140 commit 24cc657
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/beaker-hostgenerator/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down
16 changes: 13 additions & 3 deletions lib/beaker-hostgenerator/hypervisor/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24cc657

Please sign in to comment.