---
title: "Discussion on \"Containers Are Not Magic: Namespaces From Scratch\" | Hashnode"
description: "Discussion on \"Containers Are Not Magic: Namespaces From Scratch\". Learn how containers actually work by building one from scratch in Go using Linux namespaces. No Docker, just raw kernel primitives."
url: "https://hashnode.com/posts/containers-are-not-magic-namespaces-from-scratch/69e3943fee84f66e94a4877b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Containers Are Not Magic: Namespaces From Scratch](https://blog.iamvedant.in/containers-are-not-magic-namespaces-from-scratch?utm_source=hashnode&utm_medium=feed)

Learn how containers actually work by building one from scratch in Go using Linux namespaces. No Docker, just raw kernel primitives.

Apr 18 · 17 min read · blog.iamvedant.in  
Updated Apr 20  
Read the article

-   [#go](https://hashnode.com/tag/go)
-   [#linux](https://hashnode.com/tag/linux)
-   [#docker](https://hashnode.com/tag/docker)
-   [#containers](https://hashnode.com/tag/containers)
-   [#namespaces](https://hashnode.com/tag/namespaces)

## Written by

[Vedant](https://hashnode.com/@Vedant228)

@Vedant228 · Pune,India

  
[View profile](https://hashnode.com/@Vedant228)

I am a Backend Developer who designs for performance and scale. Love to explore the under the hood part of technologies.

## Responses 4

Markdown supported · ⌘↵ to post

[Laura Ashaley](https://hashnode.com/@laura-ashaley)

[Apr 20](https://hashnode.com/posts/containers-are-not-magic-namespaces-from-scratch/69e3943fee84f66e94a4877b/comment/69e646191faed8cd14bc0677)

That’s an oversimplification—containers are not just a wrapper, they’re a combination of kernel features like namespaces and cgroups that provide isolation, process control, and resource limits at the OS level.

[Vedant](https://hashnode.com/@Vedant228)

[Apr 20](https://hashnode.com/posts/containers-are-not-magic-namespaces-from-scratch/69e3943fee84f66e94a4877b/comment/69e646191faed8cd14bc0677#reply-69e646cd1faed8cd14bc9731)

Yes I understand, My intention is not to say it's not complex, my intention of mentioning that part in the title is to remove the mental doubt of "can I understand it". Since I have implemented it I know it's not something very easy but most of the part is provided by kernel. We just need to use it together to form a system.

[Laura Ashaley](https://hashnode.com/@laura-ashaley)

[Apr 20](https://hashnode.com/posts/containers-are-not-magic-namespaces-from-scratch/69e3943fee84f66e94a4877b/comment/69e642091faed8cd14b9194c)

Containers aren’t just a “wrapper”—they’re built on real kernel features like namespaces and cgroups that isolate processes and control resources, making them lightweight but powerful virtualization at the OS level.

[Vedant](https://hashnode.com/@Vedant228)

[Apr 20](https://hashnode.com/posts/containers-are-not-magic-namespaces-from-scratch/69e3943fee84f66e94a4877b/comment/69e642091faed8cd14b9194c#reply-69e643491faed8cd14ba0a19)

Yes I do agree but the primary intention of putting it in the title is I have seen many developers who never even try to explore how technologies are built under the hood. The mindset is that it is built on some complex code that needs a high level of expertise to understand which is not the case.
