How to Install Docker Portainer on Rocky Linux 9

Portainer is a lightweight, open-source management tool for Docker, providing an easy-to-use graphical interface for managing containers, images, and volumes. It is ideal for both small-scale and large-scale Docker deployments.

Prerequisites

Before installing Portainer, ensure the following:

  • Rocky Linux 9 server is running.
  • Access to the internet for downloading Docker and Portainer.

Update the System

Ensure your system is up-to-date by running the following command:

dnf update -y

Install Docker

Portainer requires Docker to be installed. If Docker is not already installed, follow these steps:

Install required dependencies:

dnf install dnf-plugins-core -y

Add Docker’s official repository:

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

Install Docker:

dnf install docker-ce docker-ce-cli containerd.io -y

Start and enable Docker:

systemctl start docker
systemctl enable docker

Check Docker status:

systemctl status docker

Ensure that Docker is active and running.

Install Portainer

Once Docker is installed and running, you can proceed to install Portainer.

Create a Docker volume for Portainer:

docker volume create portainer_data

Download and run the Portainer container:

docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

This command pulls the latest Portainer CE image and starts the Portainer container.

Access Portainer Web UI

Open a web browser and navigate to: https://:9443.

Note: Replace your-server-ip with actual IP Address

Set up the admin account by following the on-screen prompts.

image

Once logged in, you will be able to manage your Docker environment using Portainer.

image

Conclusion

This guide provides a simple step-by-step approach for installing Docker and Portainer on Rocky Linux 9. After installation, you can access and manage your Docker containers, images, and volumes through the Portainer web interface.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS