Introduction to Docker
If you haven't heard about Docker by now, crawl out from under your rock and check out what makes Docker a solution to a longstanding dilemma.
Join the DZone community and get the full member experience.Join For Free
In the last couple of years, there has been lot of excitement about Docker and many big & small companies have moved toward Docker and have incorporated it as part of their DevOps application deployment process. As part of this blog, I would like to introduce Docker and provide a synopsis on:
Challenges faced by IT companies before Docker
The Matrix from Hell
Containers & Evolution of Docker from containers
VM vs Containers
Docker & its architecture
Solution: How Docker helps in mitigating the challenges faced earlier
What is the Challenge?
As depicted in the picture below, maintaining multiple technology stacks across multiple environments was a nightmare earlier. On top of this, one has to also worry about migrating to a different technology, upgrades, etc., which not only makes it more complex, but completely nonviable to support without having huge impact of CTO and BAU operations.
The Matrix From Hell
If you Google "Matrix from Hell," I am sure you will find lot of articles on how Docker solves the matrix from hell quandary.
So what precisely is the matrix from hell? In simple words, it is the challenge of packaging any application, irrespective of language/frameworks/dependencies, so that it can run on any cloud, irrespective of the underlying OS/hardware/infrastructure.
Solution: Intermodal Shipping Container
Solution: Why It Works: Separation of Concerns
The introduction of Docker helped in the eliminating of this matrix, by isolating the worries of developers and administrators. Developers can focus on bundling applications and dependencies as containers, without agonizing over underlying hardware/infrastructure. Administrators/DevOps team can concentrate on managing containers, without agonizing over the contents of those containers.
Solution: Benefits for Developers & Administrators
What is Docker?
Docker is an open platform for developing, shipping & running distributed applications, whether on laptops, data center VMs or cloud. Docker provides the ability to package and run an application in a loosely isolated environment called a container. The Docker Platform consists of multiple product/tools, including the Docker Engine, Images, Containers, and Hub, among others.
The Docker platform is the only container platform to build, secure and manage the widest array of applications from development to production both on premises and in the cloud.
Docker Images, Containers & Registries
|An image is a static representation of the app or service and its configuration and dependencies.||Container is runtime object or representation of an image.||An image is a static representation of the app or service and its configuration and dependencies|
|An image is an instance of a container. When an image is started, it gives running container of an image.||Containers are lightweight & portable encapsulation of an environment where applications are run||A Docker image is built up from a series of layers
|A Docker image is built up from a series of layers, allowing a minimal amount of data to be sent when transferring images over network.||Command – “docker ps” only outputs running containers||Images are stored in a registry
|Images are stored in a registry such as docker hub||When a docker image is run using command “docker run” it creates a container from that instance.|
|Images are created with the “build“ command||Containers can be run in either active or detached mode.|
|Local images can be listed by running command – docker images||
Filesystem changes made in a container do not affect the image
VM vs. Containers
Solution: Docker Eliminates the Matrix From Hell
Docker solved the matrix from hell by decoupling the application from the underlying operating system and hardware. It did this by packaging all dependencies inside Docker containers, including the OS. This makes Docker containers "portable", i.e. they can run on any cloud or machine without the dreaded "it works on this machine" problems.
Solution: From Waterfall to DevOps
In one of the studies, it is estimated by Gartner that more than 50% of new workloads will be deployed into containers in atleast one stage of the application life cycle in the year of 2018.
Also, I have presented below some of the facts from RighScale 2017 State of the Cloud report. This is simply to underscore that Docker is causing the most imperative change in application deployment process.
Published at DZone with permission of Shashank Rastogi. See the original article here.
Opinions expressed by DZone contributors are their own.
Is Podman a Drop-in Replacement for Docker?
Unlocking the Power of AIOps: Enhancing DevOps With Intelligent Automation for Optimized IT Operations
A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage
File Upload Security and Malware Protection