Docker is one of the biggest buzzwords in the IT world. If you're wondering why, the main answer is because of the value that containers and development with Docker instances provide to software developers and admins -- especially those who have adopted a DevOps-centric workflow. Docker helps these development teams achieve next-generation efficiency in software delivery by solving many of the challenges associated with traditional virtualization.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
This article explains why Docker instances have proven so massively popular among software development teams and how containers provide benefits to developers that they can't get from regular virtual machines.
What does Docker do?
In most organizations, software delivery is a process with several distinct steps. The first step is designing the app. The second is writing the code. The third is building the code inside a testing environment then testing it. The fourth and final step is packaging the tested app and delivering it to users.
The only part of the software delivery pipeline that development with Docker containers changes in a big way is the last one. Containers don't necessarily change the software design or coding processes -- although, in some cases, porting legacy apps to containers requires some modifications so that the app can run as a set of microservices. Nor do containers fundamentally alter the way software is tested; they make it easier to maintain a consistent test environment, but the testing tools remain the same.
When it comes to packaging and delivering an app for production use, however, Docker instances change a lot. They allow developers to place the app inside a container, which is a software-defined environment that is easily portable. This environment is also abstracted from the host system.
The value of shipping apps as Docker instances
Which benefits do software development teams get by shipping their apps as containers? The list here is long, but the main advantages of containers include the following:
- You only have to build the app once. Because a Docker app runs inside a container, and the container can run on any system with Docker installed, there is no need to build the app and configure it for multiple types of hardware platforms or operating systems where it will run. You only have to build it once for Docker.
- You get greater consistency between testing environments and production environments. When doing development with Docker, you test your app inside a container, and you ship it inside a container. That means the environment in which you test is identical to the one in which the app will run in production. As a result, developers can have much more confidence that end users won't experience problems that the QA team missed when it was testing the app.
- You get more modularity. Doing development with Docker containers is perfect for a microservices approach to app design. Under this model, complex applications are split into discrete units. For example, your database might run in one container while the front-end part of your app runs in a separate one. This approach makes the app modular. It reduces the complexity of managing and updating the app because a problem or change related to one part of the app does not require an overhaul of the app as a whole.
If your job is to write, test and deliver code, these features will make your life much more efficient.
Development with Docker instances vs. traditional virtualization
Reading through the list above, you might be wondering what makes containers different from traditional virtual machines. After all, if you ship your app inside a virtual machine image for a platform like VMware or KVM, you also get the benefit of a build-once, deploy anywhere -- or almost anywhere, at least -- software shipping process. And virtualized environments provide a relatively high degree of consistency between testing and production.
That's all true. However, containers double down on the advantages of virtual machines in many ways, such as the following:
- Docker instances are lighter-weight. To ship an app as a virtual machine image, you have to bake an entire operating system into the image. With a container, only the app itself has to go inside the container. This translates to a less complicated build process, plus the ability to host many more containers on a single physical server.
- Containers are ultra-consistent. A virtual machine image provides a fair degree of consistency between an app's testing and production environments. But there is still more variation than you get with containers. Virtual machine images contain different types of operating systems, and those operating systems have many more environment variables than Docker. With a Docker container, there is much less room for variation, which translates to more consistency.
- Containers are free and open source. Some virtualization platforms, like KVM, are free and open source. But others, including VMware, generally require commercial licenses for enterprise use. In contrast, Docker is completely free for anyone to download and install. That helps keep users happy. No one wants to be told they have to buy a VMware license in order to use your app.
From a development and delivery standpoint, containers do everything virtual machines can do, but better.
Development with Docker instances and DevOps
But that's not the full explanation for why Docker is proving so popular among software delivery teams. The other factor at play is the shift to DevOps.
DevOps is an approach to software development and delivery that emphasizes seamless collaboration between the people who write code (the "Dev" people), the people who administrate apps in production (the "Ops," or operations, people) and everyone in between (like software testers). The goal of DevOps is to break down the silos that have traditionally separated each part of the app delivery process from the others, and to enable continuous delivery of updates to an app.
If you want to do DevOps, Docker is very helpful. Because of the environmental consistency and lightweight nature of containers, which I described above, Docker makes it possible for teams to build and ship updated code quickly. That's why Docker and DevOps go hand-in-hand.
That said, Docker is only one tool within the DevOps ecosystem. Continuous Integration servers, flexible programming frameworks and scalable infrastructure are also important components of a DevOps workflow for most organizations. The DevOps movement predated Docker by a few years, and there is no law that says you have to use containers if you want to do DevOps. So Docker and DevOps are related, but not congenitally joined, things.
Still, if you are trying to modernize your software delivery process by adopting DevOps principles, Docker will likely do much to help you achieve your goals.
The Docker container and its important to containerized development
Drawbacks and cautions when using container instances
How Docker became the defacto software container instance