Enjoy Sharing Technology!

Software,Develope,Devops, Security,TroubleShooting

Wednesday, December 29, 2021

How to install docker and docker-compose in the centos8

 CentOS8 install Docker

1、install yum-utils

sudo yum install -y yum-utils

 

2、add the docker repo

sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

 

3、Enable the nightly or test repositories

sudo yum-config-manager --enable docker-ce-nightly
sudo yum-config-manager --enable docker-ce-test

 

4、install the latest Docker and Containerd

sudo yum install https://download.docker.com/linux/fedora/30/x86_64/stable/Packages/containerd.io-1.2.6-3.3.fc30.x86_64.rpm
sudo yum install docker-ce docker-ce-cli

 

5、start Docker

sudo systemctl start docker

 

6、enable docker start when boot

sudo systemctl enable docker

 

7、check Docker version

docker -v

 

8、install docker-compose

curl -L https://github.com/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

 

9、Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose
Share:

0 comments:

Post a Comment

Search This Blog

Weekly Pageviews

Translate