Docker Installation on Ubuntu, CentOS and SuSE

 

Docker Installation on Ubuntu

1. Uninstall old docker, if there.

#apt-get remove docker docker-engine docker.io

2. Update apt package index

#apt-get update

3. Install supporting packages

#apt-get install apt-transport-https ca-certificates curl software-properties-common

4. Add docker official GPG key and verify it

#curl -fsSL https://download.docker.com/linux/ubuntu/gpg |apt-key add –

#apt-key fingerprint 0EBFCD88 (Verify GPG Key. Given string should be matched)

5. Add stable REPO

#add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”

6. Update apt index

#apt-get update

7. Install docker (community edition)

#apt-get install docker-ce

Note: If you want to install a specific docker version, run below command instead

#apt-get install docker-ce-<VERSION STRING>

#apt-get installdocker-ce-18.03.0.ce       

8. Verify docker installation

#docker run hello-world

 

Docker Installation on CentOS

1. Uninstall old docker, if there.

#yum remove docker docker-client docker-client-latest docker-common docker-latest \

docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine

2. Install supporting packages

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

3. Add stable REPO

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

#yum-config-manager –enable docker-ce-edge

#yum-config-manager –enable docker-ce-test

4. Install Docker

#yum install docker-ce

Note: If you want to install a specific docker version, run below command instead

#yum install docker-ce-<VERSION STRING>

#yum installdocker-ce-18.03.0.ce

5. Verify docker installation

#docker run hello-world

 

Docker Installation on SuSE

1. Update package index

#zypper update 

2. Add stable REPO

#zypper ar -t YUM https://packages.docker.com/1.13/yum/repo/main/opensuse/12.3 docker-1.13

#rpm –import \

‘https://sks-keyservers.net/pks/lookup?op=get&search=0xee6d536cf7dc86e2d7d56f59a178ac6c6238f52e’

#zypper refresh

3. Install docker

#zypper search -s –match-exact -t package docker-engine

#zypper install docker-engine-<version>

(Choose version of your choice from output of previous command)

4. Enable docker daemon

#systemctl enable docker.service

#systemctl start docker.service

5. Verify docker installation

#docker run hello-world

Docker Installation
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *