Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk11 min

How to Install and Use Docker on Rocky Linux 9

A complete Rocky Linux 9 guide to installing Docker Engine from the RHEL-family repository, enabling the daemon, verifying containers, using Compose, avoiding sudo safely, and protecting Docker data.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Docker Engine on Rocky Linux 9 from Docker’s RHEL-family repository, then start it with sudo systemctl enable --now docker. The repository installation supplies the Engine, CLI, containerd runtime, Buildx, and Compose plugin. Verify the complete client-to-daemon path with sudo docker run hello-world; add your account to the docker group only if you accept its root-equivalent privileges.

What you will install

Rocky Linux 9 is compatible with Docker’s RHEL-family packages. The recommended installation uses Docker’s RPM repository rather than an unrelated third-party package source. This gives DNF a normal upgrade path and installs the components needed for everyday container work.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Package Role
docker-ce Docker Engine daemon technology.
docker-ce-cli The docker command-line client.
containerd.io The container runtime component used by Docker Engine.
docker-buildx-plugin The Buildx builder plugin for image builds.
docker-compose-plugin The docker compose subcommand for multi-container applications.

The installation creates a Unix group named docker, but it does not add any users to that group automatically. Docker’s daemon runs as root and listens through a privileged Unix socket by default.

Prerequisites and compatibility checks

  • A Rocky Linux 9 host with working DNF networking.
  • An account that can run commands with sudo.
  • Enough disk space for the packages, images, writable container layers, volumes, and build cache you plan to keep.
  • A decision about whether Docker should start automatically at boot.

Before installing, check for packages that can conflict with Docker’s package set. The removal command below is safe with names that are not installed: DNF simply reports that there is nothing to remove. Removing a package does not, by itself, delete images, containers, volumes, or Docker data under /var/lib/docker/.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Step 1: Remove conflicting packages

Run this as an administrator:

sudo dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc

The list covers older Docker package names and alternate runtime packages that can interfere with dependency resolution. Review DNF’s transaction summary before confirming. If the host contains workloads managed by another container tool, stop and migrate those workloads before removing its packages.

Step 2: Add Docker’s RHEL repository

Install the DNF plugin that provides repository-management commands:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo dnf -y install dnf-plugins-core

Add Docker’s repository definition:

sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo

This command points DNF at Docker’s RHEL-family RPM repository, which is the package source used for Rocky Linux 9 in this procedure. Keep the repository enabled if you want DNF to discover future Docker updates through its normal upgrade workflow. For a controlled environment, review available versions before deciding whether to pin a particular release.

Step 3: Install Engine, CLI, Compose, and build tools

Install the complete package set:

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

DNF may ask you to accept Docker’s GPG key. Docker’s RHEL-family instructions identify this fingerprint:

060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35

Compare the fingerprint shown by DNF with that value before accepting the key. Do not approve a key whose fingerprint does not match. After the transaction completes, confirm that DNF reports the expected packages as installed rather than merely downloaded.

Step 4: Start Docker and enable boot startup

Start the daemon immediately and configure it to start whenever Rocky Linux boots:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl enable --now docker

enable creates the boot-time systemd relationship, while --now starts the service in the same command. If this machine must not run Docker automatically after reboot, use only:

sudo systemctl start docker

That starts Docker for the current boot without enabling automatic startup. Check the service state when diagnosing startup problems:

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
sudo systemctl status docker

A healthy service should show an active running state. If it is failed, read the status output and system journal, correct the reported configuration or dependency issue, and start it again.

Step 5: Verify the complete Docker path

Run Docker’s end-to-end test:

sudo docker run hello-world

This command checks more than whether the CLI binary exists. Docker contacts the daemon through its Unix socket, the daemon obtains the test image from a registry when it is not already local, creates a container, runs it, prints a confirmation message, and exits. A successful completion demonstrates that the client, daemon, runtime, image retrieval, and basic container execution are working together.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use these additional checks to inspect the installation:

sudo docker version
sudo docker info

docker version displays client and server details, while docker info reports daemon storage, runtime, logging, and host-level configuration. If docker version shows a client but cannot display server information, the CLI is installed but cannot reach a running daemon; check systemctl status docker and socket permissions.

Run Docker without typing sudo

By default, the daemon owns a privileged Unix socket, so ordinary users need sudo. Docker provides three practical choices: continue using sudo, join the docker group, or configure rootless Docker.

Choice Convenience Privilege scope Operational considerations
sudo docker ... Requires sudo for each administrative command. Commands run with explicit root authorization. Simple to understand and avoids changing supplementary groups.
docker group Routine commands run without sudo. Membership grants root-level control of the Docker daemon. Easy to use, but every process able to use the account can request privileged Docker operations.
Rootless Docker No root-owned daemon access for the user’s normal workflow. Designed to avoid root-equivalent access through the docker group. Requires additional setup and can have compatibility or operational limits; use it when the threat model requires stronger separation.

Add your login to the docker group

Only do this when you understand the security implication:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo usermod -aG docker "$USER"
newgrp docker
docker run hello-world

usermod changes the account’s supplementary groups. newgrp docker opens a shell with the new membership immediately; alternatively, log out completely and log in again. The final command should work without sudo if the daemon is running and the group membership has refreshed.

Docker explicitly treats docker group membership as root-level access. A user who can submit commands to the daemon can mount host paths, start privileged containers, and otherwise control the host through Docker. Treat membership like administrative access, review it periodically, and do not add service accounts casually.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Repair a .docker ownership error

If you previously ran Docker commands with sudo, files in your home directory may be owned by root. Later, a non-root command can then fail with a permission error while reading or writing ~/.docker. Correct the ownership of that directory for your account, then retry the Docker command. Preserve any configuration you intentionally placed there; the goal is to restore user ownership, not to delete the directory.

Install and test Docker Compose

The docker-compose-plugin package adds the modern Compose subcommand to the Docker CLI. Check that the plugin is available:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker compose version

Use a small Compose file to practice the lifecycle. The following is an illustrative smoke-test pattern:

mkdir -p ~/docker-smoke-test && cd ~/docker-smoke-test
cat > compose.yaml <<'YAML'
services:
  web:
    image: nginx:alpine
    ports:
      - "8080:80"
YAML
docker compose up -d
docker compose ps
curl http://127.0.0.1:8080
docker compose down

The file declares one service named web, pulls the nginx:alpine image if needed, and maps host port 8080 to container port 80. docker compose up -d starts it in the background, docker compose ps lists the project’s containers, and docker compose down stops and removes the resources created for that project. The curl request should be issued from a host that has the command available; it checks the published loopback endpoint rather than a public firewall path.

Do not expose a test service publicly just to prove Compose works. Binding to 127.0.0.1 in a production-oriented Compose file is a deliberate way to keep an administrative test local; the example’s 8080:80 mapping follows the supplied smoke-test pattern and should be reviewed before use on a networked host.

Use Docker for the first time

Understand images, containers, and volumes

  • An image is the immutable template Docker pulls and uses to create containers.
  • A container is a running or stopped instance created from an image.
  • A volume is persistent Docker-managed storage that can outlive an individual container.

Removing a container does not automatically remove every volume associated with an application. Conversely, deleting Docker’s data directories is far more destructive than removing a package. Plan image, container, and volume cleanup separately from software installation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the daemon’s lifecycle explicit

Use systemctl enable --now docker when Docker is a required host service. Use systemctl start docker when an administrator wants to start it only for selected maintenance windows. Stopping the service prevents new client operations while it is down; containers will not be manageable until the daemon is available again.

Updates and repository maintenance

With the repository enabled, use DNF’s ordinary update workflow and inspect the transaction before applying it. Review available Docker versions when you need to pin a release for compatibility with an application or a change-control policy. Keep the Engine, CLI, containerd, Buildx, and Compose packages aligned unless Docker’s release documentation for your environment says otherwise.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Repository installation is the convenient choice for hosts with DNF network access because package discovery and upgrades are integrated into the operating system’s package manager. It is not the only method.

Concern Repository installation Manual RPM installation
Update effort Use DNF’s normal repository-aware upgrade process. Download and install each required RPM when a release changes.
Air-gapped suitability Requires a way to mirror or otherwise provide repository content internally. Docker documents downloading RPM files for offline transfer and installation.
Version pinning Review available versions and apply your organization’s DNF controls. Select exact RPM files manually, while ensuring their dependencies match.
Signature verification DNF validates repository package metadata and keys; verify the displayed GPG fingerprint before acceptance. Verify the provenance and signatures of every transferred RPM through your established offline process.
Rollback handling Use your DNF history and package-management policy, with testing before production rollback. Retain the exact earlier RPM set and dependencies; rollback is a manual administrative procedure.
Operational maintenance Lower recurring effort on connected Rocky Linux hosts. More control for isolated hosts, but more inventory and dependency work.

Neither installation method automatically removes your containers, images, or volumes during a package upgrade. Treat application data and package lifecycle as separate concerns.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Uninstall Docker without accidentally deleting data

To remove the installed packages, use DNF with the package names from this installation:

sudo dnf remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Removing these packages does not automatically delete images, containers, volumes, or custom configuration. Docker data commonly remains under /var/lib/docker/; containerd data can remain under /var/lib/containerd/. This behavior lets an administrator reinstall packages without automatically destroying stored workloads.

Deleting either data directory is a separate, destructive decision. Stop services, identify any data that must be retained, create and verify backups, and obtain the required administrative approval before removing them. A package uninstall is reversible; deleting the storage directories may not be.

Troubleshooting common Rocky Linux 9 problems

DNF reports dependency conflicts

Read the proposed transaction and check whether one of the conflicting packages remains installed. Re-run the removal command with the exact package name shown by DNF, then retry installation. Do not blindly remove unrelated system packages to force a transaction; identify which package owns the conflicting files or runtime first.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The daemon will not start

  1. Inspect the service: sudo systemctl status docker.
  2. Read the error details displayed by systemd and correct the named configuration, storage, or dependency issue.
  3. Start Docker again with sudo systemctl start docker.
  4. Run sudo docker info after the service becomes active.

A client binary can be installed even while the daemon is stopped. The decisive check is whether the server section appears in docker version and whether docker info can query the daemon.

docker run hello-world cannot reach a registry

The test image must be available locally or downloadable through the host’s network. Check DNF and general outbound connectivity, proxy requirements, DNS, and any egress policy. A successful systemd service does not prove that registry access is permitted. Once connectivity is corrected, run the same command again.

Non-root commands still return permission denied

Confirm that the current shell has the updated supplementary group by starting a new login session or using newgrp docker. Verify that the Docker service is running. If the error references ~/.docker, repair ownership left behind by earlier sudo docker commands. Do not change the socket to world-writable permissions; that would expose the daemon’s root-equivalent control to every local user.

Compose is not recognized

Use the space-separated syntax docker compose, not the legacy hyphenated command, and confirm that docker-compose-plugin was installed. Run docker compose version as the same user who will operate the project. If the plugin is installed but the daemon is stopped, version output may still work while up fails; check the service separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A container starts but the host port is unavailable

Another process or container may already own the port. Inspect the Compose project with docker compose ps, stop the conflicting workload, or choose a different host port in the Compose file. A port mapping publishes a service beyond the container namespace, so review firewall rules and listening interfaces before making it reachable from other networks.

Security and production operations

Treat the Docker socket as an administrative boundary

Docker’s daemon always runs as the root user by default. Access to its Unix socket therefore provides powerful host control. The convenience of the docker group is equivalent to granting root-level privileges to its members, not merely granting permission to run harmless application commands.

Use individual sudo commands when explicit authorization is preferable. Choose rootless Docker when your threat model requires daemon access without root-equivalent group membership, and account for its additional setup and compatibility requirements.

Control log growth

Docker’s default json-file logging driver can grow without bounds. For production workloads, configure log rotation, use Docker’s local logging driver, or send logs to a remote logging system. Set a retention policy that matches the host’s disk capacity and your incident-response requirements; otherwise, a noisy container can consume storage needed by the daemon and the operating system.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Review network exposure separately

Installing Docker does not automatically make every container service safe for public access. Review which ports are published, which interfaces they bind to, and how Rocky Linux firewall policy handles those ports. Enable only the services and boot behavior the host actually requires. A local Compose smoke test should not become an unintended internet-facing endpoint.

A repeatable installation checklist

  • Confirm Rocky Linux 9, administrative sudo, and working DNF networking.
  • Remove conflicting Docker, runtime, and alternate container packages after reviewing DNF’s transaction.
  • Install dnf-plugins-core.
  • Add https://download.docker.com/linux/rhel/docker-ce.repo.
  • Verify Docker’s GPG fingerprint 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35 before accepting a key.
  • Install docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, and docker-compose-plugin.
  • Start and enable the service with sudo systemctl enable --now docker, or start without boot enablement when that is intentional.
  • Verify with sudo docker run hello-world, then inspect docker version and docker info.
  • Decide deliberately between continued sudo, the root-equivalent docker group, and rootless Docker.
  • Test docker compose version and a local Compose project if you will run multi-container applications.
  • Plan image, container, volume, log, firewall, backup, and update policies before moving workloads into production.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.