Home Install docker in Centos 7
Post
Cancel

Install docker in Centos 7

1. Run with sudo user

1
sudo su -

2. Install needed packages and docker

1
2
3
4
5
6
7
yum -y update

yum -y install yum-utils device-mapper-persistent-data lvm2

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

yum -y install docker-ce

3. Start docker

1
2
3
4
5
systemctl start docker

systemctl enable docker

systemctl status docker

4. Install docker compose

1
2
3
4
5
6
7
curl -L "https://github.com/docker/compose/releases/download/1.25.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose

ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

docker-compose --version
This post is licensed under CC BY 4.0 by the author.