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

Fine-Tuning GenAI - From Cool Demo to Reliable Enterprise Asset

Fine-Tuning GenAI: From Cool Demo to Reliable Enterprise Asset

Generative AI (GenAI) is quickly moving from experimentation to enterprise adoption. It can generate text, visuals, even code, but the real value emerges when these models are…

Share:
VMware to AWS Migration - 3 Technical Approaches

VMware to AWS Migration: 3 Technical Approaches That Work

Picture this: your IT team is staring at a renewal notice from VMware. Costs are higher than expected, bundles force you into features you don’t use, and…

Share:
Gen AI in Digital Product Engineering

How Gen AI is Transforming Digital Product Engineering Companies

Explore how Generative AI is reshaping digital product engineering companies by driving innovation, accelerating development, and improving customer experiences. Learn its role in modernizing workflows and building competitive advantage.

Share:
From Bottlenecks to Breakthroughs - Building Synthetic Data Pipelines with LLM Agents - Blog banner

From Bottlenecks to Breakthroughs: Building Synthetic Data Pipelines with LLM Agents

Recently, we collaborated with a team preparing to fine-tune a domain-specific Large Language Model (LLM) for their product. While the base model architecture was in place, they…

Share:
From Reactive to Proactive AI Predictive Testing in Software Development - Blog Banner

From Reactive to Proactive: AI Predictive Testing in Software Development

The old rhythm of software testing—write code, run tests, fix bugs—doesn’t hold up anymore. Continuous releases, sprawling microservices, and unpredictable user behavior are stretching QA teams beyond…

Share:
Applications of Large Language Models in Business - Blog Banner

Applications of Large Language Models in Business 

Enterprises today are buried under unstructured data, repetitive workflows, and rising pressure to move faster with fewer resources. Large Language Models (LLMs) are emerging as a practical…

Share: