Skip to content

feat: add RHEL flavors to server setup script#4037

Open
snitramodranoel wants to merge 1 commit intoDokploy:canaryfrom
snitramodranoel:feat/add-rhel-flavors
Open

feat: add RHEL flavors to server setup script#4037
snitramodranoel wants to merge 1 commit intoDokploy:canaryfrom
snitramodranoel:feat/add-rhel-flavors

Conversation

@snitramodranoel
Copy link

@snitramodranoel snitramodranoel commented Mar 19, 2026

What is this PR about?

Adds other RHEL flavors to the "almalinux" case block in the server setup script, allowing setting up other distros. Tested with Rocky Linux, CentOS, and RHEL.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #3887

Screenshots (if applicable)

Greptile Summary

This PR extends the Docker installation logic in server-setup.ts to cover additional RHEL-family Linux distributions (rocky, centos, rhel, ol) by adding them to the existing almalinux case, so they all use Docker's official CentOS CE repository instead of the generic get.docker.com script. This aligns with Docker's documented installation approach for these distros.

Key points:

  • The case-pattern change at line 502 is correct and consistent with how installUtilities() already groups centos | fedora | rhel | ol | rocky | almalinux together.
  • The new branch correctly calls systemctl start docker and systemctl enable docker, maintaining the same post-install behaviour that rocky and centos previously received in the *) fallback.
  • The *) fallback now contains dead if [ "$OS_TYPE" = "rocky" ] and if [ "$OS_TYPE" = "centos" ] blocks (lines 599–607) that can never be reached — these should be removed.

Confidence Score: 4/5

  • Safe to merge after removing the newly unreachable dead code in the *) fallback branch.
  • The change is minimal, well-targeted, and tested by the author on Rocky Linux, CentOS, and RHEL. The only issue is cosmetic dead code left behind in the fallback case that should be cleaned up, but it does not affect correctness since those branches are now unreachable.
  • The dead if [ "$OS_TYPE" = "rocky" ] and if [ "$OS_TYPE" = "centos" ] blocks at lines 599–607 of packages/server/src/setup/server-setup.ts.

Comments Outside Diff (1)

  1. packages/server/src/setup/server-setup.ts, line 599-607 (link)

    P2 Dead code: rocky and centos blocks now unreachable

    Since "rocky" and "centos" are now matched by the new case branch at line 502, the two if blocks below (lines 599–607) inside the *) fallback branch can never be reached. These should be removed to avoid confusion.

    Specifically, the entire block from line 599 to 607:

    if [ "$OS_TYPE" = "rocky" ]; then
        systemctl start docker >/dev/null 2>&1
        systemctl enable docker >/dev/null 2>&1
    fi
    
    if [ "$OS_TYPE" = "centos" ]; then
        systemctl start docker >/dev/null 2>&1
        systemctl enable docker >/dev/null 2>&1
    fi

    should be deleted, as rocky and centos now go through the new explicit branch which already calls systemctl start docker and systemctl enable docker.

Last reviewed commit: "feat: add RHEL flavo..."

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. enhancement New feature or request labels Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One liner that makes the remote server setup script compatible with other RHEL flavors

1 participant