We are living in a world of intricately designed ecosystems. And application development ecosystems are no exception. Application deployment is an integral part of any software development process and the selection of software-hardware recipe is an important aspect of these processes. Not long ago everyone in storage and data centre world was talking about, “How virtual machines are transforming the space?” And now containers are slowly taking over the baton.
Container vs. VM dilemma
Both virtual machines and containers are fairly old terms that could be stretched back to 70s. If you see container evolution timeline, 2001 was the year when containers joined hands with Linux and VServer project was created, which marked the start of containers getting into the mainstream. Virtual machines have always been a popular choice but since the past decade, the competition is heating up. So, what is best for your application servers? The truth is only you can answer this question. Because there are several aspects that need to be considered, which change for every other scenario. VMs eat up lots of resources of your infrastructure whereas containers require an operating system, supporting programs and libraries, and system resources to run a specific program. Of course, VMs have their advantages when it comes to running multiple applications on multiple operating systems and security of your system, plus you don’t have to worry about the operating systems you are using for the bundle of applications. But if you are looking for a number of similar applications or copies of applications with minimum servers, go for containers. Security is the only thing you need to keep a closer watch on.
Why is Docker so popular?
In 2013, dotCloud introduced an internal project to maintain their container technology which later was made open-source and what we now call “Docker”. Since the introduction of Docker, the containers are receiving a lot of traction. There are a number of answers to why Docker is so popular and how it is accelerating the container movement. First and the most important is security. Docker has made it safe to deploy and use containers. Namespace for isolating containers, control group configuration to limit resource usage, use of containers security scanners like Clair, removal of SUID flags from images and using images from trusted sources are some of the measures you can take to make sure your containers remain safe and sound. According to Solomon Hykes, Founder, CTO of Docker, Docker is working with the likes of Google, Red Hat, Canonical and almost all the major powers in container space on its open-source component libcontainer.
Docker can bring out the best of your development environments plus you can combine it with tools like Chef, Puppet, Ansible, Saltstack, Bamboo, etc., for your DevOps practices. And irrespective of the local host environment, Docker can enable your host to run multiple development environments considering they have same operating systems and configurations. You can create ready-to-run containerized applications in a matter of time, which gives you a lot of time to think about your deployment and management. Docker is fast, uses minimum resources and can handle a number of containers at the same time and that is what makes Docker popular.
Docker for Developers
A lot has been written, said, and implemented on the deployment abilities of Docker. But that is just one side of the coin. Docker is not just a great deployment tool but it is equally good for development. With Docker, you can build your own containers, package them with ready to run applications, distribute them, build your own images or use ready available images, build a local development environment, create, start, modify, stop, destroy with short commands issued through Docker client to a server.
There are a number of tools from and around Docker, which makes it an ideal tool for developers. I am mentioning only a few of them.
- Docker Swarm - Clustering has always been an important and to some extent, a critical thing for containers. Swarm helps developers manage clustering of Docker nodes as a single virtual system and in load balancing, filtering, clustering, and scheduling. With Swarm, you can add or remove containers as per the demand.
- Docker Compose - Even though it is a deployment tool, it helps in developing, testing, and staging of multi-container applications within Docker. You can get running with all the application needs taken care of with a single command. It can manage the entire lifecycle of your containerized applications.
- Docker Machine - It lets you install and run Docker on operating systems like Mac and Windows, provision and manage multiple Docker hosts, which can be situated remotely, with Docker Machine commands.
- Moby and LinuxKit - LinuxKit is basically a kit to build Linux subsystems irrespective of platforms. LinuxKit ensures security as it uses container specific OSes instead of general purpose OS, leanness because it uses only those parts which are required by OS and portability as it can run on any platform where Docker can run. Whereas, Moby provides freedom to developers with interchangeable components like the operating systems, orchestration frameworks or infrastructure management.
These are the tools which are from Docker. There are multiple other tools like Kubernetes, CoreOS, Mesosphere DC/OS, Flocker, Helios, Twistlock, etc., which can help developers in containerization when combined with Docker.
Docker is the best way to build, deploy, test your applications locally before you go ahead with deploying them in a production environment. All you need to do is wrap up the application with code, runtime, system tools, libraries, things you need to run your application and deploy it in the development environment with Docker. The advantage of this is the development environment is the exact approximation of your production environment, which means if it is running in dev it will work just fine in prod. With Docker, you can create dev environment in minutes, which is much faster than running it on VMs, and you can modify it, or rollback changes within no time. So, you are getting a fully functional dev environment with few commands; you can select the right tools from the list mentioned above and many more other tools available and you are good to go. You don’t need to install different languages, instead you can use Docker images of those languages which are readily available and take no time. Same is the case for different versions of the same language. You can go from Java 1.1 to 1.7 or Python 1 to Python 3 or Perl 5.18 to 5.24, just by using respective images. You don’t need to install the complete language package, which reduces overheads and saves time and efforts. Pack your code, deploy and run with the image and that’s it. You can compare the results by testing with different versions of the images and decide what is the best option to go with.
So, Docker has decimated “it works on my machine” problem as you can package dependencies with application in Docker containers, isolation allows you to edit without worrying about inter-dependencies, and you can have better team collaboration because your development team can quickly bring changes into production. In addition, there are a number of tools which you can Combine with Docker for DevOps. So, the options are endless for developers if you choose Docker for your containers. Opcito is official Docker partner and can help you get up and running with your container initiatives using Docker.
Leave Comment