Docker Introduction: What is Docker? — Part 1

Joseph Eshiett
3 min readDec 2, 2021

--

What is docker? What were some problems faced before the need for containers? What is the difference between a container and a VM? What are the benefits of using docker? All those questions will be answered in this article, stay tuned.

Containers vs VM

Containers are an abstraction at the app layer that packages code and dependencies together. Containers can be described as a form of Operating System virtualization. A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. Multiple containers can run on the same machine and share the OS kernel with other containers, each running as isolated processes in userspace. A container does not require a full OS and it simply shares the underlying OS but runs in isolation.

Virtual Machines are an abstraction of physical hardware whereby one server is turned into many servers. The hypervisor allows multiple VMs to run on a single machine. Each VM includes a full copy of an operating system, the application, necessary binaries, and libraries — taking up tens of GBs. VMS can be slow to boot.

Problems Faced Before Implementation of Container Technology

For any groundbreaking technology to arise, there had to be a problem it was created to solve, so is the case for container technology. Below are some problems faced by developers before the implementation of Container technology:

  • A problem of incompatibility of services with libraries and dependencies of the Operating System example: One service may require version A of a library while Another service may require version B of the same library.
  • With every update to a version of a library, reassessment has to be made so the different services that share the library still remain compatible and also work fine with the underlying OS. This can be quite a hassle.
  • “Matrix from Hell!” Meaning it is a challenge to package any application, regardless of language/frameworks/dependencies, so it can run on any infrastructure.

What is Docker?

“Docker is simply a tool for running applications in an isolated environment.”

Also according to the Docker Official Documentation, “Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly.”

Although Docker is quite similar to a Virtual Machine. It is much faster and does not require an entire Operating System to run. With the aid of Docker, apps can run in any environment meaning If it works in the staging environment it also works in the production environment, “If it works on my laptop it can work on yours.” Docker has become a standard for software deployment because it makes it easy for packaging applications.

Benefits of Using Docker

  • With the aid of docker applications that are running in containers can be set up in seconds instead of minutes like with VMs,
  • Fewer resources result in less disk space utilization. Docker isn’t as resource-hungry as VMs.
  • Uses less memory meaning faster and smoother operation.
  • Docker does not need a full Operating System to run.
  • With Docker comes ease of deployment, as applications are pushed from code to prod in a matter of minutes or even seconds.
  • With Docker, things can be tested locally before being in the desired environment.
  • With Docker scalability comes with ease as you can quickly create new containers if demand for your applications requires them.

And there you have it! now you know what Docker is, the problems that Docker solves, and also the benefits of using Docker. For the next article, we will be getting our hands dirty by creating our very own Docker container with NGINX running inside of the container. Stay tuned.

Thank you for taking the time to read this!

Please do leave a comment if you have any thoughts on the topic — I am open to learning and continuous improvement!

I can imagine how helpful this post has been, do leave a clap 👏 below a few times to show your support for the author!

--

--