Introduction to Linux Containers and Docker

LINUX CONTAINERS

The Linux Containers (LXC) feature is a lightweight virtualization mechanism that does not require you to set up a virtual machine on an emulation of physical hardware.

Makes use of:
1) Namespaces: User, Network, Hostname, Filesystem, Process table
2) Cgroups for resource limits
3) Seccomp – filtering of system calls
4) AppArmour/SELinux
5) Like chroot environment only more secure and more full featured

Benefits are – Application isolation, Near native performance, and Dynamic control of resource allocation (thinprovisioned)

Limitations – All use hosts kernel

Dockers
Docker consists of the Docker Engine, which packages and runs the applications, and the Docker Hub Registry, which shares the applications in a Software-as-a-Service (SaaS) cloud. The philosophy of Docker and Linux Containers philosophy is different. Docker works towards Portability, Standardized Environments, Rapid scale-up/scale-down, Ability to build a continuous delivery (CD) pipeline and Dependency management.

Why Docker? – For Faster Application Development, suits agile development, easy multiplication of environments and meets Scaling Requirements.

Container for Docker is based on Namespaces, cgroups (control groups) and copy-on-write.

Container Build System is to define a Docker file which is recipe describing the build process, very easy to learn, supports caching (like git) and is highly reliable & reproducible.

Container images as compared to VM images are much smaller as they do not require hardware support, kernel or driver, no separate handling of logs, metrics, backups, all done only by host, if required. Layered architecture, like 1 layer = 1 build step, is based on git and using copy-on-write, only difference is committed as a new layer. Docker Image Distribution is through Docker Registry same as git repositories.

Docker ecosystem, apart from millions of images is being integrated in thousands of projects like Dashboard, testing system, etc. Some official projects/tools that should be noted are: Machine (deploy Docker hosts); Compose (Manage multi-container applications) & Swarm (cluster multiple Docker hosts together)

How to dockerize an application?
1) Write a dockerfile for the main component.
2) Write a docker-compose.yml for the app.
3) Use Docker+Compose during development.
4) Use Docker+Compose for
testing/QA/Acceptance,.
5) Go to production using Docker+Compose

If you have 100s of containers build self-service container. Note: libcontainers is built by Docker and used as default container technology

For more information on on libcontainers Vs Linux containers visit https://www.brighttalk.com/webcast/286/160339

To know more email: marketing@calsoftinc.com
Contributed by: Shriram Pore | Calsoft Inc.

 
Share:

Related Posts

Gen AI Trends 2025

Top Generative AI Trends Shaping 2025

Modernization of industries began with the Industrial Revolution in the early 19th Century with the use of machines, and it has continued with the digitization of devices…

Share:
IoT and its Applications in Driving Smart Manufacturing

IoT and its Applications in Driving Smart Manufacturing

The Internet of Things (IoT) is a key element of global industrial transformation, and the manufacturing sector leads in leveraging this technology. The millions of IoT devices,…

Share:
Product Lifecycle Management in Software Development using Large Language Models

Product Lifecycle Management in Software Development using Large Language Models

The data of any organization is of extreme value. But what happens when that data is not trustworthy and accessible to your teams? You will face challenges…

Share:
Understanding the Differences Between Public, Private, and Hybrid Cloud Solutions

Understanding the Differences Between Public, Private, and Hybrid Cloud Solutions

Discover the key distinctions between public, private, and hybrid cloud solutions to help choose the right model for your business needs.

Share:
How Server Virtualization Works

How Server Virtualization Works

Discover how server virtualization optimizes hardware utilisation by creating multiple virtual servers on a single physical machine, enhancing efficiency and flexibility in IT environments.

Share:
Understanding Cloud Infrastructure Services

Understanding Cloud Infrastructure Services

Discover how Cloud Infrastructure Services can transform your business with scalable, cost-effective, and agile IT solutions.

Share: