Install PORTAINER using DOCKER on ROCKY LINUX

How to Install Portainer in Docker on Rocky Linux

Step 1: Install Docker on Rocky Linux

Before using Portainer, ensure you have Docker installed. If not, follow these steps:

  1. Update your package manager's cache:
  2. sudo dnf update
  3. Install required dependencies:
  4. sudo dnf install -y dnf-plugins-core
  5. Add the Docker repository and install Docker:
  6. sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
    sudo dnf install -y docker-ce docker-ce-cli containerd.io
  7. Start and enable the Docker service:
  8. sudo systemctl start docker
    sudo systemctl enable docker
  9. Verify Docker installation:
  10. sudo docker --version

Step 2: Install Portainer

Deploy Portainer as a Docker container:

  1. Pull the Portainer Docker image:
  2. sudo docker pull portainer/portainer-ce
  3. Create a Docker volume for Portainer data persistence:
  4. sudo docker volume create portainer_data
  5. Start the Portainer container:
  6. sudo docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

Step 3: Access Portainer

Access Portainer's web interface:

  1. Open your web browser and navigate to:
  2. http://your_server_ip:9000

    Replace your_server_ip with your Rocky Linux server's IP address.

Step 4: Set Up Portainer

Complete Portainer's setup:

  1. Choose a password for the admin user.
  2. Specify a Portainer agent endpoint (leave as default for local Docker).
  3. Click "Connect."
  4. Create an admin user account (username and password).
  5. Click "Create user."
  6. You'll be redirected to the Portainer dashboard to manage Docker resources.

That's it! You've successfully installed Portainer in a Docker container on Rocky Linux and can now use it to manage Docker resources through its web-based interface.

Related Articles