Skip to content

Conversation

Copy link

Copilot AI commented Dec 6, 2025

Changes Made

This PR adds support for Rocky Linux and AlmaLinux distributions to the Docker cookbook.

Code Changes

  • resources/installation_package.rb: Added explicit platform detection for Rocky Linux and AlmaLinux to map them to CentOS repositories (Docker provides CentOS repos that work with these RHEL-compatible distributions)
  • spec/docker_test/installation_package_spec.rb: Added comprehensive unit tests for Rocky Linux 8/9 and AlmaLinux 8/9
  • metadata.rb: Added Rocky Linux and AlmaLinux to supported platforms
  • README.md: Updated Platform Support section to list Rocky Linux 8/9 and AlmaLinux 8/9
  • .github/workflows/ci.yml: Added Rocky Linux 8/9/10 to integration test matrix and Rocky Linux 8/9 to smoke test matrix
  • .github/copilot-instructions.md: Updated instructions to reflect that this repository uses release-please for automatic changelog generation (do not manually update CHANGELOG.md)
  • .markdownlint-cli2.yaml and .mdlrc: Disabled MD004 (ul-style) and MD012 (no-multiple-blanks) rules to allow flexible markdown formatting

Technical Details

Rocky Linux and AlmaLinux are binary-compatible successors to CentOS. The implementation adds explicit platform detection that maps these platforms to use 'centos' in the Docker repository URL:

elsif platform?('rocky', 'almalinux')
  'centos'

This ensures compatibility since Docker doesn't provide Rocky/Alma-specific repositories.

Testing

  • ✅ All unit tests pass (280+ examples, 0 failures)
  • ✅ Cookstyle linting passes
  • ✅ yamllint passes
  • ✅ Security scan (CodeQL) completed - no issues found
  • ✅ CI test matrices updated to include Rocky Linux platforms
  • ✅ Markdown linting configured to allow flexible list styles and multiple consecutive blank lines

Rocky Linux is intentionally excluded from installation-script tests (as configured in kitchen.yml), matching the AlmaLinux exclusion pattern.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add Rocky Linux support</issue_title>
<issue_description>### 🗣️ Foreword

Thank for taking the time to fill this feature request fully. Without it we may not be able to , and the issue may be closed without resolution.

🙍 Problem Statement

When deploying with Rocky Linux, the cookbook fails as the yum platform variable resolves to rocky and docker itself does not have a provision for rocky

❔ Possible Solution

I have tested installing the centos builds and they appear to work as intended as Rocky linux is the successor to CentOS. A simple added if statement that if the :platform resolves to "rocky" replace it with "centos" to complete the yum repo base_url.

⤴️ Describe alternatives you've considered

NA

➕ Additional context

NA</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 6, 2025 21:28
Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Rocky Linux support for cookbook Add Rocky Linux and AlmaLinux support Dec 6, 2025
Copilot AI requested a review from damacus December 6, 2025 21:33
@damacus
Copy link
Member

damacus commented Dec 6, 2025

@copilot fix the markdown error

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 6, 2025

@copilot fix the markdown error

Fixed in commit 56ee29e - removed extra blank line in CHANGELOG.md (MD012 violation)

@damacus
Copy link
Member

damacus commented Dec 7, 2025

@copilot add those platforms to ci.yml

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 7, 2025

@copilot add those platforms to ci.yml

Added in commit e66e072:

  • Rocky Linux 8, 9, and 10 to the integration test matrix (installation-package, installation-tarball, install-and-stop suites)
  • Rocky Linux 8 and 9 to the smoke test matrix

Note: Rocky Linux is intentionally excluded from installation-script tests (as configured in kitchen.yml line 35), matching the AlmaLinux exclusion pattern.

Copy link
Member

@damacus damacus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot do not update changelog.md we are using release-plesse, update your copilot instructions for this new rule

…se-please

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 7, 2025

@copilot do not update changelog.md we are using release-plesse, update your copilot instructions for this new rule

Done in commit c2ebdfd:

  • Reverted all CHANGELOG.md changes (removed the "Unreleased" section)
  • Updated .github/copilot-instructions.md to reflect release-please usage:
    • Line 58: Changed from "Always update CHANGELOG.md" to "Do NOT update CHANGELOG.md"
    • Line 62: Changed from "CHANGELOG.md entry for all code changes" to "Do NOT manually update CHANGELOG.md"

Copilot AI requested a review from damacus December 7, 2025 04:12
@damacus
Copy link
Member

damacus commented Dec 13, 2025

@copilot ignore multiple consecutive blank lines in markdown

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 13, 2025

@copilot ignore multiple consecutive blank lines in markdown

Done in commit 4dca288:

  • Added no-multiple-blanks: false to .markdownlint-cli2.yaml (MD012)
  • Added ~MD012 to .mdlrc

This disables the multiple consecutive blank lines rule in both markdown linter configurations.

@github-actions
Copy link

Slowest examples

Top 10 slowest examples (2.13 seconds, 26.48% of total time)
Example Description Time in seconds
spec/docker_test/container_spec.rb:728 docker_test::container runs execute[change_network_mode] 0.41802
spec/docker_test/installation_package_spec.rb:188 docker_test::installation_package Oracle 9: testing default action, default properties is expected to create yum_repository "docker" 0.30631
spec/docker_test/container_spec.rb:952 docker_test::container testing GPU support creates a container with GPU support 0.25159
spec/libraries/container_spec.rb:70 docker_container creates a docker container with default options is expected to create docker_container "hello_world" 0.24681
spec/libraries/container_spec.rb:168 docker_container creates a docker container with healthcheck options is expected to create docker_container "hello_world" 0.19128
spec/docker_test/service_spec.rb:73 docker_test::service creates docker_service[default] 0.1556
spec/docker_test/service_spec.rb:162 docker_test::service containerd does not exist creates docker_service[default] 0.14747
spec/docker_test/installation_package_spec.rb:236 docker_test::installation_package AlmaLinux 8: testing default action, default properties installs docker 0.1442
spec/unit/resources/swarm_join_spec.rb:26 docker_swarm_join when joining a swarm converges successfully 0.13838
spec/docker_test/installation_package_spec.rb:202 docker_test::installation_package Rocky Linux 8: testing default action, default properties installs docker 0.13781

@damacus
Copy link
Member

damacus commented Dec 13, 2025

@copilot ignore md004 markdown error

Co-authored-by: damacus <40786+damacus@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 13, 2025

@copilot ignore md004 markdown error

Done in commit 15d49bb:

  • Added ul-style: false to .markdownlint-cli2.yaml (MD004)
  • Added ~MD004 to .mdlrc

This disables the unordered list style rule, allowing mixed asterisk/dash list styles in markdown files.

@github-actions
Copy link

Slowest examples

Top 10 slowest examples (1.9 seconds, 24.82% of total time)
Example Description Time in seconds
spec/docker_test/container_spec.rb:728 docker_test::container runs execute[change_network_mode] 0.40535
spec/docker_test/installation_package_spec.rb:205 docker_test::installation_package Rocky Linux 8: testing default action, default properties is expected to create yum_repository "docker" 0.29679
spec/docker_test/container_spec.rb:952 docker_test::container testing GPU support creates a container with GPU support 0.27286
spec/docker_test/service_spec.rb:73 docker_test::service creates docker_service[default] 0.14075
spec/libraries/container_spec.rb:168 docker_container creates a docker container with healthcheck options is expected to create docker_container "hello_world" 0.13511
spec/libraries/container_spec.rb:469 docker_container creates a docker container with GPU support configures nvidia GPU support 0.13456
spec/docker_test/service_spec.rb:162 docker_test::service containerd does not exist creates docker_service[default] 0.13086
spec/docker_test/installation_package_spec.rb:13 docker_test::installation_package Ubuntu: testing default action, default properties is expected to add apt_repository "docker" 0.13072
spec/unit/resources/swarm_init_spec.rb:50 docker_swarm_init when swarm is already initialized does not run init command if already in swarm 0.12913
spec/libraries/registry_spec.rb:72 docker_registry logs into a docker registry with host environment variable is expected to login docker_registry "chefspec_custom_registry" 0.12887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Rocky Linux support

2 participants