My Notes


Manjush's Blog Install Docker in ubuntu

Docker Editions

https://store.docker.com/

* Docker CE (Community Edition)

free to use

* Docker EE (Enterprise Edition) 

paid one

support + extra products

docker.com/pricing

 

Docker based on OS :

* Docker for Windows

* Docker for Mac

* Docker for AWS/Azure/Google

*Linux (different per distro)

 

Stable Vs Edge

Edge (beta) released monthly , Stable quarterly

Edge gets new features first , but only supported for a month

Stable rolls in three months of edge features, EE supports longer

Installing Docker On Linux

Do *not* use your built in default packages like apt/yum install docker.io  because those packages are old and not the Official Docker-Built packages. 

 

* Go to https://store.docker.com/  select Community Edition.

* Select  Docker Community Edition for Ubuntu 

* Click on Usage Instructions.

* Click on Install Instructions.

* see Get Docker for Ubuntu. This has all instruction on how to install Docker.

 

Easy Step using script :

* to get the script go to link https://get.docker.com/

* copy this and paste into terminal 

curl -fsSL get.docker.com -o get-docker.sh

* after that in terminal run this
$ sh get-docker.sh

Add User with root previleges

$ sudo usermod -aG docker manjush

To check docker is working

$ sudo docker version

Note : All redhat, centos, fedora may sometimes requires sudo to run docker commands

In these OS if you run docker version command without sudo, then you may get an error

Got permission denied while trying to connect to the docker Daemon socket at .....

Two tools required for docker 

* Docker Compose

* Docker Machine

How to install these will get instructions from Docker docs.

Install Docker Machine

If you are running on Linux:

$ curl -L https://github.com/docker/machine/releases/download/v0.14.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine && \
sudo install /tmp/docker-machine /usr/local/bin/docker-machine 

To get latest version from GitHub

https://github.com/docker/machine/releases

Install Docker Compose

Run this command to download the latest version of Docker Compose:

sudo curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Alternative approach to install Docker Machine from GitHub

https://github.com/docker/compose

click on releases get the latest version 

copy the curl , requires root permission , so 

$ sudo -i

and then run the command

$ exit

Logout and check the installation

$ docker-compose version