Docker & Portainer Installation Guide on Centos 7

How to install and setup container with Docker and Portainer.io UI on CentOS 7.

STEP 1- we update list of all package updates from repositories.

sudo yum check-update

STEP 2- Download script from get.docker.com and run it.

curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh

STEP 3- If you want to use docker with non-root user, add your user to “docker” group

sudo usermod -aG docker root

STEP 4- Start Docker daemon

sudo systemctl start docker

STEP 5- Docker start automatically on reboots

sudo systemctl enable docker

STEP 6- Create docker volume for portainer.io data

docker volume create portainer_data

STEP 7- We will install Portainer.io. With this command Docker pulls latest image from repository and creates portainer.io service listening port 9000 with restart policy that starts container if state is any other than running

docker run -d --restart unless-stopped -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

IP-address http://:9000 and create admin password

Thats it :slight_smile:

Community Page
Last updated: