惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园 - 【当耐特】
量子位
Engineering at Meta
Engineering at Meta
博客园_首页
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
V
Visual Studio Blog
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
Jina AI
Jina AI
The Cloudflare Blog
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
博客园 - 聂微东

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Episode 2: The Anatomy of a Hero (The Inner Workings)
Fjr · 2026-05-05 · via DEV Community

Fjr

Jack had finally stepped into the world of Docker. It felt like magic, but Jack was never one to just believe in "magic spells." He was curious. He wanted to look under the hood and see what actually made Docker so powerful.
He had one big question: How could 50 different people live in the same "apartment building" (the Host OS) without accidentally reading each other's mail or eating each other's food? He needed to understand the mechanics of Isolation.
To truly master this world and, of course to impress Rose with his technical depth Jack decided to dive deep. He discovered that the entire Docker universe is built on Three Main Pillars.


Section 2: The Three Pillars of Docker

To understand how Docker works, you have to understand how it talks to the Linux Kernel (the brain of your computer). It uses three specific tools to create the "Apartment" environment.

Pillar 1: Security (Namespaces)
The Invisibility Cloak. Namespaces are what provide Isolation. When you run an app in Docker, the Kernel puts a "wrapper" around it called a Namespace.

How it works: It tricks the app into thinking it is the only process running on the whole computer. The app cannot see other apps, other files, or even the network of the main computer.

Why we need it: If App A doesn't know App B exists, it can’t interfere with it, steal its data, or crash it. It’s like being in a room with no windows or doors you don't even know there’s a building outside.

Pillar 2: Strength (Cgroups)
The Resource Police. Cgroups (Control Groups) manage the Strength and limits of your app.

How it works: In a normal PC, if one app gets "hungry," it can eat 100% of your RAM and CPU, making the rest of your computer lag or crash. Cgroups set strict rules: "You can only use 2GB of RAM and 10% of the CPU."

Why we need it: It prevents one "greedy" process from starving the others. It ensures that every container has exactly what it needs to survive, but not a drop more.

Pillar 3: Speed (UnionFS & Layers)
The Transparent Sandwich. This is where Docker gets its Speed.

How it works: Instead of copying a whole Operating System for every app, Docker uses Layers. Think of it like a sandwich: the bottom bread is "Ubuntu," the middle is "Python," and the top is "Your Code."

Why we need it: If you have 10 apps that all use "Ubuntu," Docker only stores that bottom layer once. When you start a new app, it just snaps a new "Top Layer" on. This makes starting an app take seconds instead of minutes.


The Form: Image vs. Container

If the 3 Pillars are the "Physics," how do we actually build something? This is where I have really struggled, so let’s break it down simply:

The Image is your Instruction Book. It isn’t "alive." It is a read-only set of instructions (Layers) on how to build a room.
Layer 1: Lay the foundation (Linux/Python).

Layer 2: Bring in the tools (FastAPI/Libraries).

Layer 3: Add your personal stuff (Your Code).

The Container: The Actual Room
The Container is the Actual Room built by following those instructions. When you "Run" the book, Docker follows the layers and opens the door. Now the room is active and isolated.If you dont get it now dont worry we will cover this more in detail in an incomming chapter.


The Final Quest: Jack’s "Ghost" Protocol

Jack stood in front of the terminal, sweating. He wanted to prove to Rose that he wasn't just "running commands" he was a Master of Dimensions.

"Watch this," he whispered. "I’m going to step into another world where your files don't even exist."

Now, it’s your turn to be Jack.

Your Mission(If you choose to accept it):
Open your terminal (Your "Teleportation Device").

Type:

docker run -it ubuntu bash

Enter fullscreen mode Exit fullscreen mode

Once you’re in, try to find your "Downloads" folder or your "Pictures."

Typels(List files).

Type ps aux (See running processes).

The Moment of Truth: Do you see your Spotify playing? Do you see your Chrome tabs? No. You are a ghost. You are in a Namespace wrapper. You have the Security of a vault and the Strength of a Cgroup bodyguard.

If you successfully "teleported" without crashing your laptop, leave a comment below saying: "I'm in the Namespace, Jack!"

Next Episode: The Secret Scroll
Jack has explored the "Apartment," but now he wants to build his own. But he can't just wish it into existence he needs to write the Secret Scroll (The Dockerfile).

In Episode 3, we learn the ancient language of FROM, COPY, and RUN to build our very own world from scratch.

Don't let the Whale wait—see you in the next one!