Wednesday, 4 February 2015

Installation and configuration of Docker

In privious Blog I have mention Docker Introduction. 

I have Installed Docker Ubuntu so below are the steps to installation
  •        Docker is supported on the following versions of Ubuntu:
  •        Ubuntu Trusty 14.04 (LTS) (64-bit)
  •        Ubuntu Precise 12.04 (LTS) (64-bit)
  •        Ubuntu Raring 13.04 and Saucy 13.10 (64 bit)
Please read Docker and UFW, if you plan to use UFW (Uncomplicated Firewall)
Ubuntu Trusty 14.04 (LTS) (64-bit)

Ubuntu Trusty comes with a 3.13.0 Linux kernel, and a package which installs Docker 1.0.1 and all its prerequisites from Ubuntu's repository.
Note: Ubuntu contain a much older KDE3/GNOME2 package called docker, so the Ubuntu-maintained package and executable are named

Ubuntu-maintained Package Installation

To install the latest Ubuntu package (this is not the most recent Docker release):
$ sudo apt-get update
$ sudo apt-get install
Then, to enable tab-completion of Docker commands in BASH, either restart BASH or:
$ source /etc/bash_completion.d/
Note: Since the Ubuntu package is quite dated at this point, you may want to use the following section to install the most recent release of Docker. If you install the Docker version, you do not need to install from Ubuntu.

Docker-maintained Package Installation

If you'd like to try the latest version of Docker:
First, check that your APT system can deal with https URLs: the file /usr/lib/apt/methods/https should exist. If it doesn't, you need to install the package apt-transport-https.
[ -e /usr/lib/apt/methods/https ] || {
  apt-get update
  apt-get install apt-transport-https
Then, add the Docker repository key to your local keychain.
$ sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
Add the Docker repository to your apt sources list, update and install the lxc-docker package.
You may receive a warning that the package isn't trusted. Answer yes to continue installation.
$ sudo sh -c "echo deb docker main\
> /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker

There is also a simple curl script available to help with this process.
$ curl -sSL | sudo sh

To verify that everything has worked as expected:
same way you can access your container.

$ sudo docker run -i -t Ubuntu /bin/bash
Which should download the Ubuntu image, and then start bash in a container.

RHEL 6 you need to Install EPEL repo and then you need run below mention command 
 yum install docker

In RHEL 7. it's inbuild Package. you don't need to install additional 

NOTE: If you wanted to launch your docker container  then you need to write dockerfile and need to build the docker container.
More Information you can Click here

No comments:

Post a Comment