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")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:Linux]]
 
[[Category:Linux]]
 +
 +
Enable Docker repository on CentOS/Red Hat
 +
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
 +
 +
Install Docker
 +
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
 +
 
 +
On Debian/Ubuntu systems do instead
 +
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
 +
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
 +
apt-update ; apt install docker-ce
 +
 
 +
If you stick with podman on Red Hat, just create an alias:
 +
alias docker=podman

Latest revision as of 17:28, 7 April 2020


Enable Docker repository on CentOS/Red Hat

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

Install Docker

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

On Debian/Ubuntu systems do instead

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-update ; apt install docker-ce

If you stick with podman on Red Hat, just create an alias:

alias docker=podman