Docker is becoming buzz word for virtualization over the past year. You might have heard of Dockers many places while following up trends on the cloud, virtualization, containerizing applications and many other trending topics.
If you haven’t heard of it yet, no worries. Let’s have a brief about what Docker Container is? And how you can get it on the well-known cloud infrastructures?
Docker is an open platform for application development, running and packaging based on Linux containers takes virtualization to the next level over virtual machines. Many organization are adopting cloud based application deployment and leaving behind traditional application development and deployment platforms. Docker Container provides easier way to build and deploy your business critical applications within totally isolated containers. These Linux-based Docker Containers enables capabilities to kernel containment rather than simulating and running a separate kernel with every virtual machine. It also completely isolates your application data and computing on the shared resources.
Docker works as a server-client model. Docker daemon doesn’t not allow users to directly communicate, users need to use Docker clients to interact with Docker daemon. Docker daemon allows you to deploy your application within separate containers. Docker allows you to create new and update your existing Docker images for your application. These images are read-only templates could consist of Ubuntu Linux operating system with Apache and also your application with complete configuration. Docker provides Docker Registry that can be configured as private or public store to upload or download your Docker Images.
Docker also allows you to simplify creating multi-container applications. With Docker you can define multiple Docker Containers within the single file and it will allows you to build your multi-container application with a single command.
Now you can deploy your applications on the cloud and scale your application to meet ever changing user demand. Today many cloud providers are allowing to host your application within Document Containers including Microsoft Azure, Amazon Web Services, Google, Joyent, IBM and Rackspace cloud.
Let’s have a look into Docker deployment some common cloud infrastructure for Docker deployment.
Microsoft Azure allows you to deploy Docker on the Azure with Azure Docker VM Extension. Azure Linux Agent manages Azure Docker to create a Docker VM to build, run, test, deploy and share your application in the Docker Containers. Azure allow two ways to deploy Docker-based Linux VM on Azure:
Here we will show how to configure Docker VM Extension to create own private PaaS with the Azure Portal. If you want to know more about Azure Cross-Platform interface for configuration, visit here.
docker –tls -H tcp://dockerextension.cloudapp.net:2376 info
Note: You should replace “dockerextension” with the subdomain for your Azure Virtual Machine
Using Dockers on Amazon Web Services Cloud allows you to build, run, test, deploy and share your Linux Container based application. Amazon EC2 Container Service also known as Amazon ECS allows to launch and stop container-based applications using API calls also gives visibility into state of your application cluster with centralized service.
Following are steps to install Docker on an Amazon Linux Instance
sudo yum update –y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
docker info
Once you have successfully installed Docker engine, now let’s discuss how to create new image for your application into Docker Container Images. To explore this scenario, we are taking Django application (which is a free and open source web application framework, written in Python). Following are high level steps to package your application into Docker Container Images:
$ mkdir -p dockyard/hello_django_docker
$ cd dockyard/hello_django_docker
$ git clone
NOTE: To show steps for copying our application source into newly created directory, we have uploaded application source file on Github.
Note: Save your script as docker-entrypoint.sh and define permissions for executing this file.
$ chmod u+x docker-entrypoint.sh
NOTE: This file will include information about OS for your application image, environment variables, system tools and libraries, etc.
$ docker build -t user/hello_django ~/dockyard/hello_django_docker
docker images
In the next part of this article series, we will talk about options available for storing and distributing Docker image.
Stay tuned!!!