Română

The Container Revolution: An Introduction to What Docker Is

The Container Revolution: An Introduction to What Docker Is
14.05.2021
Note: This article is over a year old. Some information may be outdated. We recommend reading the latest documentation or talking to one of our experts.

What is a container ?

A container is a set of isolated processes and resources. It is an abstraction at the application level that bundles code and dependencies together. More than one container can run on the same machine and share the OS kernel with others, each of them running as isolated processes. Practicaly, a Docker container can be used to wrap an application.

Images and containers are the core concepts of Docker. A Docker Image contains everything you need to run the software (code, drivers, runtime, libraries, scripts etc.). A Docker Container is a running instance of a Docker Image which runs on the kernel of the host OS.

One of the biggest advantages of using Docker is that you can pack your application and deliver it with its configuration so it can be used out of the box. To deploy the application, it’s image must be run. After the container is started, the application can be accessed directly.

Containers are a solution to the problem of how to get programs to run smoothly when the environment is changed. In software development problems arise when the supporting environment is not identical.

 

Differences between a container and Virtual Machines:

  1. Docker containers share the same system resources as the operating system. Hardware-level resources are not separated so the containers are not independent machines.
  2. An operating system does not have to be installed inside
  3. Docker containers are lightweight because they mostly include application-level dependencies.  With a full virtualized system you get more isolation but this requires much more resources. Docker provides less isolation but the containers require fewer resources so you can run thousands of containers on a host.
  4. A Docker container takes seconds to start whereas a full virtualized system takes minutes.

 

Benefits of Docker Containers

  1. Ensure consistency between the online and offline environments.
  2. The deployment process of web apps is greatly simplified
  3. Security is improved because of the sandbox mechanism. Since the app runs in the container and is isolated, the OS cannot be damaged. Also, if there is an attack and the web application freezes, only the container needs to be restarted.
  4. An application can be split into modules, each module with a separate container. This is known as the microservices approach. Changes can be done to one module without the need to rebuild an entire application. Because the containers are lightweight, microservices can be instantiated when we need them and will be available almost instant.
  5. Docker Containers are on every platform: Linux, Windows, Cloud, Serverless etc.

See OPTI’s support for other server services

Quick Questions

What is the main difference between Docker and a Virtual Machine (VM)?

A VM includes an entire operating system, while a Docker container shares the host OS kernel. This makes containers much lighter, faster, and less resource-intensive.

What is a Docker image?

A Docker image is a package that contains everything needed to run an application: the code, libraries, environment variables, and configuration files.

What problem does Docker solve?

Docker solves the 'it works on my machine' problem. By packaging an application and its dependencies into a container, it ensures that it will run the same way regardless of the environment it's deployed in.

What is the TLDR (conclusion)?

Docker is a cornerstone of modern DevOps and microservices architecture. By containerizing applications, developers can ensure consistency across development, testing, and production environments, which is essential for building reliable CI/CD pipelines.

What technologies and methodologies are involved?

Technologies: Docker, Containers, Images, Virtual Machines (VMs)
Methodologies: Virtualization, DevOps, Software development, Scalability

Marian Călborean

Article written by

Marian Călborean

Manager, Software Architect, PhD. in Logic, Fulbright Visiting Scholar (CUNY GC, 2023)

See on LinkedIn →
Interesat?

Interested?

Schedule a meeting

Get a Free Audit

News and Guides

More News