Docker is a container-based software framework for automating deployment of applications. “Containers” are encapsulated, lightweight, and portable application modules.

Docker was only available on Ubuntu. Nowadays, it is possible to deploy docker on RHEL based systems (e.g. CentOS) and others as well.

Installation of Docker

Install Docker by installing the docker-io package:

apt-get update

apt-get -y install docker.ioLink and fix paths with the following two commands:

ln -sf /usr/bin/ /usr/local/bin/docker

sed -i '$acomplete -F _docker docker' /etc/bash_completion.d/

Configure Docker to start when the server boots:

update-rc.d defaults

Interested in mastering Docker Training? Enroll now for FREE demo on Docker Training.

Download a Docker Container

Download the fedora Docker image

docker pull ubuntu

Run a Docker Container

-To set up a basic ubuntu container with a bash shell, we just run one command.

-docker run will run a command in a new container, -i attaches stdin and stdout, -t allocates a tty, and we’re using the standard ubuntu container.

docker run -i -t ubuntu /bin/bash

To disconnect from the shell without exiting use the escape sequence Ctrl-p + Ctrl-q.

For indepth understanding of Docker click on