This host mirrors dl.rockylinux.org — BaseOS,
AppStream, extras, and CRB — across the currently supported Rocky Linux
major releases. Point dnf/yum here to speed up
installs and cut outbound bandwidth. The examples below use
mirror.sepehrsabz.ir/rocky.
Edit Rocky Linux's .repo files in
/etc/yum.repos.d/ — comment out mirrorlist=
and set baseurl= to the mirror instead.
[baseos]
name = Rocky Linux $releasever - BaseOS
#mirrorlist = https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever
baseurl = https://mirror.sepehrsabz.ir/rocky/$releasever/BaseOS/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
[appstream]
name = Rocky Linux $releasever - AppStream
#mirrorlist = https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=AppStream-$releasever
baseurl = https://mirror.sepehrsabz.ir/rocky/$releasever/AppStream/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
[crb]
name = Rocky Linux $releasever - CRB
#mirrorlist = https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=CRB-$releasever
baseurl = https://mirror.sepehrsabz.ir/rocky/$releasever/CRB/$basearch/os/
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
CRB (CodeReady Builder, formerly PowerTools on Rocky
8) is disabled by default — enable it with
dnf config-manager --set-enabled crb if you need
development headers or static libs from it.
| Version | Upstream base | Notes |
|---|---|---|
10 | RHEL 10 | Current major release |
9 | RHEL 9 | Long-term maintained |
8 | RHEL 8 | Maintained until EOL, check upstream |
Rocky Linux tracks RHEL's own support lifecycle 1:1 — check wiki.rockylinux.org/rocky/version for exact end-of-life dates for each major version, since they follow Red Hat's published schedule rather than a Rocky-specific cadence.
FROM rockylinux:9
RUN sed -i 's|^mirrorlist|#mirrorlist|; s|^#baseurl=https://dl.rockylinux.org|baseurl=https://mirror.sepehrsabz.ir|' \
/etc/yum.repos.d/rocky*.repo && \
dnf makecache
The official Rocky Linux images already ship a
commented-out baseurl= template pointing at
dl.rockylinux.org — uncomment and repoint that line rather
than adding a new one, to avoid duplicate repo IDs.
dnf repolist -v | grep -i baseurl
curl -s https://mirror.sepehrsabz.ir/rocky/9/BaseOS/x86_64/os/repodata/repomd.xml -o /dev/null -w "%{http_code}\n"
# install something and time it
time sudo dnf install -y htop
| Check | Expected result |
|---|---|
dnf repolist -v | Shows mirror.sepehrsabz.ir as the baseurl |
GET /repodata/repomd.xml | 200 — mirror is reachable |
| First install of a package | Slower — cache miss, fetched from upstream and stored |
| Repeat install elsewhere on the network | Fast — served from local cache |
gpgcheck=1 still
validates every package against the Rocky Linux signing key
regardless of which mirror served the bytes — switching
baseurl doesn't touch that chain.
Rocky Linux is a 1:1 binary-compatible rebuild of RHEL, governed by the Rocky Enterprise Software Foundation (RESF) — package versions and update timing track Red Hat's upstream releases closely. This mirror doesn't publish packages, only reads. If it's served over plain HTTP internally, that's fine for dnf — package signatures, not transport TLS, are what dnf actually trusts by default.