Difference between revisions of "Docker installation"

From Tech-Wiki
Jump to: navigation, search
(Created page with "Category:Linux After installing Docker, remember to configure the service to automatically start chkconfig docker on ; systemctl enable docker")
 
Line 1: Line 1:
 
[[Category:Linux]]
 
[[Category:Linux]]
 +
 +
Enable Docker repository
 +
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
 +
 +
Install Docker
 +
dnf list docker-ce
 +
dnf install docker-ce --nobest -y
  
 
After installing Docker, remember to configure the service to automatically start
 
After installing Docker, remember to configure the service to automatically start
  chkconfig docker on ; systemctl enable docker
+
  chkconfig docker on ; service docker start
 +
systemctl enable docker ; systemctl start docker
 +
 
 +
Install Docker Compose
 +
curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 +
chmod +x /usr/local/bin/docker-compose

Revision as of 17:23, 7 April 2020


Enable Docker repository

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

Install Docker

dnf list docker-ce
dnf install docker-ce --nobest -y

After installing Docker, remember to configure the service to automatically start

chkconfig docker on ; service docker start
systemctl enable docker ; systemctl start docker 

Install Docker Compose

curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose