This repository provides User Manual for setting up a Docker environment tailored for testing DGTD code.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

6.5 KiB

Docker 101

Docker is a platform for developing, shipping, and running applications. It uses containerization technology to package software and its dependencies into standardized units called containers. These containers are lightweight, portable, and isolated, allowing applications to run consistently across different environments, from development to production.

With Docker, developers can build, ship, and deploy applications faster and more efficiently by eliminating compatibility issues between different systems. Docker simplifies the process of managing and scaling applications, making it easier to deploy and update software in any environment, whether it's on-premises, in the cloud, or hybrid.

Overall, Docker revolutionizes the way applications are developed, deployed, and managed, enabling teams to innovate more rapidly and reliably.

Motivation for Containers

To see why containers are useful, let us look at the following 2 scenarios.

Scenario Traditional Instructions With Docker
Development To set up the development environment, install these libraries and run these scripts "Run docker compose up"
Deployment To run the software, prepare Ubuntu of version 22.02. Install these dependencies and run the software "Run container image with these options"

Evolution of Virtualization

In modern computing, various technologies cater to different needs and scenarios. Bare metal, virtual machines, and containers represent three fundamental approaches to deploying and managing applications, each with its own set of advantages and use cases.

1. Bare Metal

Bare metal refers to the traditional method of running applications directly on physical servers without any virtualization layer. In this setup, the operating system interacts directly with the underlying hardware. Bare metal environments offer maximum performance and control since all resources are dedicated to the application. They are ideal for high-performance workloads where every bit of computational power counts.

image

2. Virtual Machines (VMs)

Virtual machines emulate physical hardware within a host server, allowing multiple operating systems and applications to run independently on the same physical hardware. Each VM runs its own guest operating system, providing strong isolation from other VMs. VMs offer flexibility, enabling different operating systems and configurations to coexist on the same hardware. They are commonly used for server consolidation, testing, and development environments.

When using VM, a hypervisor is usually needed. It is a software or firmware layer that enables the creation and management of virtual machines (VMs) on physical hardware. It sits between the hardware and the operating systems (OS) running on the VMs, facilitating the sharing of physical resources among multiple virtual environments.

There are two main types of hypervisors:

  1. Type 1 Hypervisor (Bare Metal Hypervisor):

Type 1 hypervisors run directly on the physical hardware without the need for a host operating system. They are often referred to as "bare metal" hypervisors because they have direct access to the underlying hardware. Examples include AWS Nitro System, VMware vSphere, and Microsoft Hyper-V. Type 1 hypervisors provide efficient and high-performance virtualization, making them suitable for enterprise-level deployments and cloud computing environments.

  1. Type 2 Hypervisor (Hosted Hypervisor):

Type 2 hypervisors run on top of a host operating system, which means they rely on the underlying OS for hardware access. These hypervisors are commonly used on desktop or workstation environments for development, testing, and running multiple operating systems simultaneously. Examples include Oracle VirtualBox, VMware Workstation, and Parallels Desktop. While Type 2 hypervisors offer ease of use and flexibility, they may introduce some performance overhead due to the additional layer of the host OS.

image

3. Containers

Containers are lightweight, portable, and isolated environments for running applications and their dependencies. Unlike VMs, containers share the host operating system's kernel, which reduces overhead and improves efficiency. Containers provide fast deployment times and scalability, making them ideal for microservices architectures, continuous integration and deployment (CI/CD) pipelines, and DevOps practices.

image

Comparison Between Bare Metal, Virtual Machines, and Containers
Aspect Bare Metal Virtual Machines Containers
Isolation No isolation between applications. Strong isolation between VMs. Isolated containers with shared OS kernel.
Resource Utilization Utilizes all resources of the physical server. Resources are divided among VMs. Lightweight, shares OS resources, minimal overhead.
Performance Offers highest performance as there's no overhead. Slightly reduced performance due to virtualization layer. Near-native performance, minimal overhead.
Scalability Scalability is limited by physical hardware constraints. Scalable, but constrained by host's resources. Highly scalable, can run numerous containers on a host.
Deployment Time Typically longer deployment times due to hardware setup. Longer deployment times due to virtualization setup. Very fast deployment times due to lightweight nature.
Flexibility Less flexible as hardware configurations are fixed. More flexible due to virtual hardware configurations. Highly flexible, can package and run various apps.
Resource Overhead No overhead as resources are dedicated to the system. Overhead from virtualization layer and guest OS. Minimal overhead as containers share host resources.
Use Cases Suitable for high-performance applications. Used for testing, development, and server consolidation. Ideal for microservices, CI/CD pipelines, and DevOps practices.
Dependency management Bad Good Good

Contents

desktop build Manual