Skip to content
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
- centos-stream-9
- centos-stream-10
- debian-12
- rockylinux-8
- rockylinux-9
- rockylinux-10
- ubuntu-2204
- ubuntu-2404
suite:
Expand Down Expand Up @@ -105,6 +108,8 @@ jobs:
- "almalinux-8"
- "almalinux-9"
- "debian-12"
- "rockylinux-8"
- "rockylinux-9"
- "ubuntu-2004"
- "ubuntu-2204"
- "ubuntu-2404"
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ This file is used to list changes made in each version of the docker cookbook.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [11.10.2](https://github.com/sous-chefs/docker/compare/11.10.1...v11.10.2) (2025-10-15)
## Unreleased

### Added

* Add Rocky Linux and AlmaLinux support - map to CentOS repositories since they are CentOS successors

## [11.10.2](https://github.com/sous-chefs/docker/compare/11.10.1...v11.10.2) (2025-10-15)

### Bug Fixes

Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of
## Platform Support

- Amazon Linux 2
- Debian 9/10/11
- Debian 9/10/11/12
- Fedora
- Ubuntu 18.04/20.04/22.04
- CentOS 7/8
- Ubuntu 18.04/20.04/22.04/24.04
- CentOS 7/8/9
- Rocky Linux 8/9
- AlmaLinux 8/9

## Cookbook Dependencies

Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
supports 'fedora'
supports 'redhat'
supports 'ubuntu'
supports 'rocky'
supports 'almalinux'

gem 'docker-api', '>= 2.3', '< 3'
3 changes: 3 additions & 0 deletions resources/installation_package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ def version_string(v)
# s390x is only available under rhel platform
elsif platform?('redhat', 'oracle') && (arch == 's390x' || !el7?)
'rhel'
# Rocky and AlmaLinux are CentOS successors, use centos repos
elsif platform?('rocky', 'almalinux')
'centos'
# use rhel for all el8 since CentOS 8 is dead
elsif el8? && !platform?('centos')
'rhel'
Expand Down
68 changes: 68 additions & 0 deletions spec/docker_test/installation_package_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,74 @@
end
end

context 'Rocky Linux 8: testing default action, default properties' do
platform 'rocky', '8'
cached(:subject) { chef_run }
it 'installs docker' do
expect(chef_run).to create_docker_installation_package('default')
end
it do
expect(chef_run).to create_yum_repository('docker').with(
baseurl: 'https://download.docker.com/linux/centos/8/x86_64/stable',
gpgkey: 'https://download.docker.com/linux/centos/gpg',
description: 'Docker Stable repository',
gpgcheck: true,
enabled: true
)
end
end

context 'Rocky Linux 9: testing default action, default properties' do
platform 'rocky', '9'
cached(:subject) { chef_run }
it 'installs docker' do
expect(chef_run).to create_docker_installation_package('default')
end
it do
expect(chef_run).to create_yum_repository('docker').with(
baseurl: 'https://download.docker.com/linux/centos/9/x86_64/stable',
gpgkey: 'https://download.docker.com/linux/centos/gpg',
description: 'Docker Stable repository',
gpgcheck: true,
enabled: true
)
end
end

context 'AlmaLinux 8: testing default action, default properties' do
platform 'almalinux', '8'
cached(:subject) { chef_run }
it 'installs docker' do
expect(chef_run).to create_docker_installation_package('default')
end
it do
expect(chef_run).to create_yum_repository('docker').with(
baseurl: 'https://download.docker.com/linux/centos/8/x86_64/stable',
gpgkey: 'https://download.docker.com/linux/centos/gpg',
description: 'Docker Stable repository',
gpgcheck: true,
enabled: true
)
end
end

context 'AlmaLinux 9: testing default action, default properties' do
platform 'almalinux', '9'
cached(:subject) { chef_run }
it 'installs docker' do
expect(chef_run).to create_docker_installation_package('default')
end
it do
expect(chef_run).to create_yum_repository('docker').with(
baseurl: 'https://download.docker.com/linux/centos/9/x86_64/stable',
gpgkey: 'https://download.docker.com/linux/centos/gpg',
description: 'Docker Stable repository',
gpgcheck: true,
enabled: true
)
end
end

# Coverage of all recent docker versions
# To ensure test coverage and backwards compatibility
# With the frequent changes in package naming convention
Expand Down