How to Install and Use Docker Machine 1.6 (Image, Containers) in Ubuntu Server 15.04, 14.10 - 64Bit - Cloud Network

Networking | Support | Tricks | Troubleshoot | Tips

Buymecoffe

Buy Me A Coffee

Friday, July 3, 2015

How to Install and Use Docker Machine 1.6 (Image, Containers) in Ubuntu Server 15.04, 14.10 - 64Bit


 Hello Everyone,

In this tutorial,

Let Us Install Docker Machine 1.1 in Ubuntu 15.04

You Can also Install in Debian/Ubuntu/Linux Mint.

Download
Website:- http://www.docker.com

Prerequisites
Docker requires a 64-bit installation
kernel must be 3.10 at minimum or newer Version  ( uname -r )

To upgrade your kernel and install the additional packages.

Update your package manager & Login as a Root.
Step1 :- SU &   sudo apt-get update

Install both the required and optional packages.
Step2 :- sudo apt-get install linux-image-generic-lts-trusty
              sudo apt-get install linux-image-extra-`uname -r`

Reboot your host.
Step3 :- sudo reboot

Installing Docker Machine or Add docker repository key to apt-key for package verify
Step4 :- wget   -qO-   https://get.docker.com/    |     sh 
        Or sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -“

Verify docker is installed correctly
Step5 :- docker  run -it ubuntu bash

Optional Configurations for Docker on Ubuntu
    Create a docker group
    Adjust memory and swap accounting
    Enable UFW forwarding
    Configure a DNS server for use by Docker

Create the docker group and add your user.
Step6 :- sudo  usermod  -aG  docker  ubuntu

Verify your work by running docker without sudo.
Step7 :-  docker run -it ubuntu bash

Adjust memory and swap accounting
Step8 :- sudo nano /etc/default/grub/
Set the GRUB_CMDLINE_LINUX value as follows
Step9 :- GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

Update GRUB.
Step10 :- sudo update-grub
Step11 :- Reboot  system

Verify that UFW is installed and enabled.
Step12 :- sudo ufw status

Step13 :- sudo nano /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT“

Step14 :- sudo ufw reload

Allow incoming connections on the Docker port.
Step14 :- sudo ufw allow 2375/tcp

Configure a DNS server for use by Docker
Step15 :- sudo nano /etc/default/docker

Add a setting for Docker.
Step16 :- DOCKER_OPTS="--dns 8.8.8.8  --dns 192.168.0.1 ”

Replace 8.8.8.8 with a local DNS server such as 192.168.0.1. You can also specify multiple DNS servers. Separated them with spaces, for example:
--dns 8.8.8.8 --dns 192.168.0.1

Restart the Docker daemon.
Step17 :- sudo restart docker

Get the latest Docker package
Step 2 :-  wget -qO- https://get.docker.com/ | sh

Verify docker installed or not
Step 3 :-  sudo docker-run hello-world

Show running containers
Step 4 :- sudo docker ps
Step 5 :- sudo docker images

Run a container from a specific image
Step 6 :-  sudo docker run -i -t <image_id || repository:tag> -bash

Start a existed container
Step 7 :-  $ sudo docker start -i <image_id>

Attach a running container:
Step 8 :-  $ sudo docker attach <container_id>


Upgrade Docker


To install the latest version of Docker, use the standard -N flag with wget

Step18 :- wget -N https://get.docker.com/ | sh

Error
TLS enabled daemon withou TLS ?

Answer
Sudo docker -d

-------------------------------------------------------------------------------
For Your Information Only

I am Willing to Make a FREE or CHARGE Website, if YOU WANT ME TO MAKE A VIDEOS ON Different Technologies I WILL DO IT..

Share My Video, Like it, Watch Others Videos and Have any Quries Email me (itcloudnet@gmail.com)
----------------------------------------------------------------------------------

NOTE :- For Any Clarification Please Comment Below

Comment,
Like and
Share us and help us to spread.

####--------------------------­------------------------------­------------------------------­####
Subscribe :- http://www.youtube.com/user/itcloudnet?sub_confirmation=1
Website :- http://www.cloudnetwork.in
Facebook :- http://facebook.com/itcloudnetwork
Twitter :- http://twitter.com/itcloudnet
Pinterset :- http://pinterset.com/itcloudnet
LinkedIn :- http://in.linkedin.com/pub/itcloudnet
Google+ :- https://plus.google.com/u/0/107923552480070716949/posts
Skype Id :- cloud.network1
E-Mail Id :- itcloudnet@gmail.com
####--------------------------­------------------------------­------------------------------­--####

Thanking You
Hope U Like it........