Codementor Events

Pros and Cons of Using Docker Containers

Published Jul 09, 2018
Pros and Cons of Using Docker Containers

If you are a developer, and you’re reading this, I am sure will agree that there are many things about development that make you feel itchy. Something of the same sort happened with few developers who got frustrated with building apps differently for Windows and Linux OS. It motivated them to build something that ran applications independent of the operating system or environment. And, so, containers got invented.
In simple words, a container separates a developer’s application code from any other kind of code to make sure that the application runs in all kinds of environment. A Docker packages applications in containers, allowing them to run irrespective of the operating system.
So, let’s take a look at some of the advantages and disadvantages of using Docker containers:

Advantages of Docker
It’s Fast
I think you already know what I mean by this. You may understand the pain of running something inside a virtual environment. It includes a long and nasty procedure of booting up and starting the application you wanted to run. It was all about patience, my friend! With Docker, we forgot that problem. Docker actually removed the need to boot up a full virtual machine and allowed apps to start and run in a virtual, software-defined environment at a much faster pace.

It’s Well Documented
When we’re looking at the Docker advantages, this definitely stands out. The Docker team went really smart when it came to documentation. It is always up-to-date. This is worth the praise it already receives because Docker is a rapidly evolving platform. A new version gets released every now and then. Even then, there is no compromise on documentation. In case the information only applies to certain versions of Docker, the docs make sure you get that right.

Brought Importance to Public Repositories
Docker relies on public repositories to distribute and install software. Both GitHub and Linux that have been doing the same for a longer time. But with GitHub, it only allowed one to copy code and not the fully functional apps. And, as for Linux distributions, the repositories only work on Linux. Through Docker Hub, Docker changed the way people thought about repositories and used them. These are no longer used for just source code extraction or to be used on Linux. It’s the Docker Hub where there are thousands of container images that anyone can access in a single command.

Disadvantages of Docker
Docker is Platform-Dependent
Docker was and still is Linux-only. Pinched, right? Though Docker is showcasing that it supports Windows and Mac OS X also, it utilizes virtual machines to run on non-Linux platforms. This is not an actual support. It'll be a great day when there will be no virtualization layer between the host OS and Docker and we would be running run Docker containers seamlessly on Mac OS X and Windows.
Still Far Away Easy Storage Options?
I am positive that we’re nearing the time to explore better storage options for Docker containers. But currently, there is no easy way to connect containers to storage. If you’re expecting Docker Data Volumes to solve the storage problems, it may get done but in an inefficient way. This is one of the major Docker disadvantages but let’s hope for better days.
Poor Monitoring
If you need very basic information about your containers, the stats command will suffice. But what about if you are looking for advanced learning? You will be disappointed! Though there are third-party tools like CAdvisor offering more monitoring, it would have been great if there was a better way to collect more data about containers in real-time with Docker itself.
Here, we have discussed some pros and cons of working with Docker container. Nonetheless, they can be really helpful. Taking a Docker Tutorial is definitely beneficial if you’re a developer looking forward to deploying applications on many different systems.

Discover and read more posts from Amit Jat
get started
post commentsBe the first to share your opinion
Show more replies