Released Docker 1.10.2 with New Compose file, improved security & networking

Docker allows you to run a application with all of its dependencies inside software containers by sharing host operating system kernel. It uses resource isolation features from Linux kernel such as cgroups, namespaces & aufs (advanced multi layered unification filesystem). This will allow us to run multiple containers on host operating system & does not require Guest operating systems Unlike a virtual machine (Docker is completely different from virtual machine). Docker containers run on any computer, any infrastructure and any cloud because which is not tied with any specific infrastructure.

Containers are running on host operating system and sharing the same kernel, so they start instantly and make more efficient use of RAM. Images are constructed from layered file systems so they can share common files, making disk usage and image downloads much more efficient. Docker designed to run on 64-bit architecture with Linux kernel 3.10 and later. especially it was designed for Ubuntu operating systems and later on stage adapted with all the major Linux operating systems such as CentOS, RHEL, Fedora, Ubuntu, Debian, Mint, Arch Linux, opeSUSE, suse, Gentoo & Oracle Linux. The latest version of Docker 1.10.2 released on February 23, 2016.

1) Install Docker on Ubuntu/Debian/Mint Systems

We can easily install Docker to Ubuntu, Debian & Mint systems by adding the Docker official repo.

# Check Kernel Version #
$ uname -r

# Prerequisites #
$ sudo apt-get install apt-transport-https ca-certificates

# Install/Enable aufs support #
$ sudo apt-get install linux-image-extra-`uname -r`

# Add GPG Key #
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

# Add Docker Repo to Ubuntu 12.04, 14.04 & 15.10 Systems #
$ sudo sh -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-'$(lsb_release -cs)' main' >> /etc/apt/sources.list.d/docker.list"

# Add Docker Repo to Debian Systems 7 & 8 #
$ sudo sh -c "echo 'deb https://apt.dockerproject.org/repo debian-'$(lsb_release -cs)' main' >> /etc/apt/sources.list.d/docker.list"

# Add Docker Repo to Mint 17.1, 17.2 & 17.3 Systems #
$ sudo sh -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-trusy main' >> /etc/apt/sources.list.d/docker.list"

# Update system index #
$ sudo apt-get update && sudo apt-get upgrade

# Install Docker #
$ sudo apt-get install docker-engine

# Start Docker daemon #
$ sudo service docker start     # For SysVinit Systems #
$ sudo systemctl start docker   # For systemd Systems #

# Verify Docker #
$ sudo docker run hello-world

2) Install Docker on RPM Systems

We can easily install Docker to CentOS, RHEL, SL, Fedora & Oracle Linux systems by adding the Docker official repo except openSUSE because since openSUSE 13.2 added into openSUSE official repo. Docker supports CentOS 6 (Additional steps need to take), CentOS 7, RHEL 7, Fedora 20, Fedora 21, Fedora 22, Fedora 23, openSUSE 13.2, openSUSE Leap 42.1, Oracle Linux 6 & Oracle Linux 7.

# Update system #
# [yum|dnf] update # dnf for fedora 22 & later, reset use yum #

# Change [OS] to centos (centos, rhel & sl), fedora, oraclelinux #
# tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/[OS]/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF

# Install Docker #
# [yum|dnf] install docker-engine # dnf for fedora 22 & later, reset use yum #

# Start Docker daemon #
# service docker start     # For SysVinit Systems #
# systemctl start docker   # For systemd Systems #

# Verify Docker #
# docker run hello-world

2a) Install Docker on RPM Systems

Alternatively we can install Docker to RPM based system except openSUSE by running the Docker installation script. This script adds the docker.repo repository and installs Docker.

# Update system #
# [yum|dnf] update # dnf for fedora 22 & later, reset use yum #

# Script will download repo and install Docker #
$ curl -fsSL https://get.docker.com/ | sh

# Start Docker daemon #
# service docker start     # For SysVinit Systems #
# systemctl start docker   # For systemd Systems #

# Verify Docker #
# docker run hello-world

3) Install Docker on openSUSE

We can install Docker to openSUSE systems from openSUSE official Repository by firing below commands.

# Update system #
# zypper install update

# Install Docker #
# zypper install docker-engine

# Start Docker daemon #
# systemctl docker start

# Verify Docker #
# docker run hello-world

4) Install Docker on Archi Linux

We can install Docker to Archi Linux systems from openSUSE official Repository or AUR package by firing below commands.

# Install Docker From Archi Linux Repo #
$ sudo pacman -S docker
or
# Install Docker From AUR package #
$ yaourt -S docker-git

# Start Docker daemon #
$ sudo systemctl start docker

# Verify Docker #
$ sudo docker run hello-world

Verify Docker output.

# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
03f4658f8b78: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest

Hello from Docker.
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/userguide/

Docker Version checking.

# docker --version
Docker version 1.10.1, build 9e83765

5) Useful Docker commands

Here i’m including few useful Docker commands.

# Available Docker Commands #
# docker

# To get Docker Information #
# docker info

# To check Docker version #
# docker version

# To check available Docker image on local #
# docker images

# Search Docker image from docker hub, change [Image Name] to debian, ubuntu, centos, etc #
# docker search [Image Name]

# To download Docker image #
# docker pull [Image Name]

# Run Docker container #
# docker run [Image Name]

# To remove Docker image #
# docker rmi [Image Name]

That’s it as of now, stay tune with us will come with new Tips…)

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...

Shares
Close
Please support the site
By clicking any of these buttons you help our site to get better