Docker Downsides: Container Cons to Consider before Adopting Docker
Like any technology, Docker is not a silver bullet. It has its downsides, and it's important to understand them if you're considering migrating to Docker.
Docker containers are massively popular — and for good reason. But like any technology, Docker is not a silver bullet. It has its downsides, and it's important to understand them if you're considering migrating to Docker.
Let me be clear that I think Docker is a great platform for many use cases. Docker containers are an excellent way to deploy microservices-based applications that are more modular and easier to manage. There are also security benefits to using containers, and containers consume system resources more efficiently.
Docker's Disadvantages
Yet Docker's not perfect. Following are disadvantages associated with Docker:
- Containers don't run at bare-metal speeds. Containers consume resources more efficiently than virtual machines. But containers are still subject to performance overhead due to overlay networking, interfacing between containers and the host system and so on. If you want 100 percent bare-metal performance, you need to use bare metal, not containers.
- The container ecosystem is fractured. Although the core Docker platform is open source, some container products don't work with other ones — usually due to competition between the companies that back them. For example, OpenShift, Red Hat's container-as-a-service platform, only works with the Kubernetes orchestrator.
- Persistent data storage is complicated. By design, all of the data inside a container disappears forever when the container shuts down, unless you save it somewhere else first. There are ways to save data persistently in Docker, such as Docker Data Volumes, but this is arguably a challenge that still has yet to be addressed in a seamless way.
- Graphical applications don't work well. Docker was designed as a solution for deploying server applications that don't require a graphical interface. While there are some creative strategies (such as X11 video forwarding) that you can use to run a GUI app inside a container, these solutions are clunky at best.
- Not all applications benefit from containers. In general, only applications that are designed to run as a set of discreet microservices stand to gain the most from containers. Otherwise, Docker's only real benefit is that it can simplify application delivery by providing an easy packaging mechanism.
If you're considering migrating to Docker, you should keep these facts in mind. Docker isn't always the best choice for application deployment. In some cases, traditional virtual machines or bare-metal servers are better solutions. Don't let the Docker hype obscure this reality.
Christopher,
Thanks for your
Christopher,
Thanks for your article. I would agree that Docker is not a panacea for all application development models. I think something to keep in mind for your readers new to Docker is even virtual machines don’t run at bare metal speeds. Maybe another chart you could have included advantages of Docker/microservices so your reader could see the pro/con for themselves. The popularity you refer to is a result of developers/companies applying this tool to their business problem.
The development teams I interact with are looking for application packaging and delivery solutions to deploy product in the cloud. It is a different approach from the monolith applications they are used to creating (12factor.net/).
Best Regards,
Steve Poe
Steve,
I believe Christopher’s article was more comprehensive than just the disadvantage of ‘bare metal speeds’ and comparison to virtual machines.
One of the major letdowns of docker in my honest opinion is the lack of native solutions for persistent data storage. If I were to rank Steve’s 5 disadvantages to Docker he listed, I would rank persistent data storage as the #1 disadvantage.
While there are many solutions coming up to combat this, I still see them as something you have to ‘add-on’ to a docker containerization environment. There is a reason VM’s come loaded with all that stuff, so that you don’t have to worry about ‘adding-on’ things to your implementation.
At some point, the folks who parade around ‘containerization through docker’ are going to quickly find that they’ve had to add on so much stuff to their implementation in order to fill the gaps, that the advantages of this now complex and bulky containerized environment do not outweigh the reasons to use VMs anymore.
Furthermore, I don’t believe there will ever be an environment in which VMs and Containerization will ever solve all problems respectively; each has their own unique place in the development ecosystem.