How To Use Docker

This post include information of installation and simple useage of docker.

Install docker

For Ubuntu

Docker needs Ubuntu system which version is higher then 3.10, so first check that:

uname -r

Using shell sciprt to install:

wget -qO- | sh

For macOS

Using Homebrew install Docker:

brew cask install docker

For All Linux

$ #[sudo apt-get remove docker docker-engine]

$ sudo apt-get update

$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \

$ curl -fsSL | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88

result should be like this:

pub   4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <>
sub   4096R/F273FCD8 2017-02-22

if correct, then:

$ sudo add-apt-repository \
"deb [arch=amd64] https:// \

$(lsb_release -cs) \

$ sudo apt-get update

$ sudo apt-get install docker-ce

# Test
$ sudo docker run hello-world

For other system see Docker install

Docker commands

All Commands with explanation here