DataBurst Data Engineering Wiki - Roadmap Step-by-Step: https://wiki.databurst.tech/docs/roadmap/ - Introduction: https://wiki.databurst.tech/docs/roadmap/introduction/ - Programming Language: https://wiki.databurst.tech/docs/roadmap/programming-language/ - Python: https://wiki.databurst.tech/docs/roadmap/programming-language/python/ - Java: https://wiki.databurst.tech/docs/roadmap/programming-language/java/ - Scala: https://wiki.databurst.tech/docs/roadmap/programming-language/scala/ - Go: https://wiki.databurst.tech/docs/roadmap/programming-language/go/ - Rust: https://wiki.databurst.tech/docs/roadmap/programming-language/rust/ - Operating System: https://wiki.databurst.tech/docs/roadmap/operating-system/ - Windows: https://wiki.databurst.tech/docs/roadmap/operating-system/windows/ - Linux: https://wiki.databurst.tech/docs/roadmap/operating-system/linux/ - Networking: https://wiki.databurst.tech/docs/roadmap/networking/ - Protocols: https://wiki.databurst.tech/docs/roadmap/networking/protocols/ - TCP/IP: https://wiki.databurst.tech/docs/roadmap/networking/protocols/tcp/ - DNS: https://wiki.databurst.tech/docs/roadmap/networking/protocols/dns/ - HTTP: https://wiki.databurst.tech/docs/roadmap/networking/protocols/http/ - HTTPS: https://wiki.databurst.tech/docs/roadmap/networking/protocols/https/ - SSH: https://wiki.databurst.tech/docs/roadmap/networking/protocols/ssh/ - UDP: https://wiki.databurst.tech/docs/roadmap/networking/protocols/udp/ - Concepts: https://wiki.databurst.tech/docs/roadmap/networking/concepts/ - IP addressing: https://wiki.databurst.tech/docs/roadmap/networking/concepts/ip-addressing/ - DHCP: https://wiki.databurst.tech/docs/roadmap/networking/concepts/dhcp/ - Firewalls: https://wiki.databurst.tech/docs/roadmap/networking/concepts/firewalls/ - VPN: https://wiki.databurst.tech/docs/roadmap/networking/concepts/vpn/ - General Software Engineering Skills: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/ - OAuth: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/oauth/ - JWT: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/jwt/ - GraphQL: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/graphql/ - REST: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/rest/ - gRPC: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/grpc/ - Caching: https://wiki.databurst.tech/docs/roadmap/general-software-engineering-skills/caching/ - Web Frameworks and API Development: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/ - Python: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/python/ - Go: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/go/ - Java: https://wiki.databurst.tech/docs/roadmap/web-frameworks-and-api-development/java/ - Version Control System: https://wiki.databurst.tech/docs/roadmap/version-control-system/ - git: https://wiki.databurst.tech/docs/roadmap/version-control-system/git/ - Version Control System Hosting: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/ - Github: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/github/ - Gitlab: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/gitlab/ - BitBucket: https://wiki.databurst.tech/docs/roadmap/version-control-system-hosting/bitbucket/ - Distributed Systems Concepts: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/ - CAP: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/cap/ - PACELC: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/pacelc/ - Sharding: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/sharding/ - Clock: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/clock/ - ACID: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/acid/ - Replication: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/replication/ - Distributed Transactions: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/transaction/ - Indexing: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/indexing/ - Batch and Stream Processing: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/batch-and-stream-processing/ - Consistency vs Eventual Consistency: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/consistency-vs-eventual-consistency/ - Normalization or Denormalization: https://wiki.databurst.tech/docs/roadmap/distributed-systems-concepts/normalization-or-denormalization/ - SQL Fundamentals: https://wiki.databurst.tech/docs/roadmap/sql-fundamentals/ - Basic SQL: https://wiki.databurst.tech/docs/roadmap/sql-fundamentals/basic-sql/ - Advanced SQL: https://wiki.databurst.tech/docs/roadmap/sql-fundamentals/advanced-sql/ - Databases: https://wiki.databurst.tech/docs/roadmap/databases/ - Relational: https://wiki.databurst.tech/docs/roadmap/databases/relational/ - NoSQL: https://wiki.databurst.tech/docs/roadmap/databases/nosql/ - Columnar: https://wiki.databurst.tech/docs/roadmap/databases/nosql/columnar/ - Document Based: https://wiki.databurst.tech/docs/roadmap/databases/nosql/document-based/ - Key-Value: https://wiki.databurst.tech/docs/roadmap/databases/nosql/key-value/ - Time Series: https://wiki.databurst.tech/docs/roadmap/databases/nosql/time-series/ - Vector: https://wiki.databurst.tech/docs/roadmap/databases/nosql/vector/ - Graph: https://wiki.databurst.tech/docs/roadmap/databases/nosql/graph/ - NewSQL: https://wiki.databurst.tech/docs/roadmap/databases/nosql/newsql/ - Data Modeling: https://wiki.databurst.tech/docs/roadmap/data-modeling/ - Star Schema (Ralph Kimball): https://wiki.databurst.tech/docs/roadmap/data-modeling/star-schema/ - Snowflake: https://wiki.databurst.tech/docs/roadmap/data-modeling/snowflake/ - Data Vault: https://wiki.databurst.tech/docs/roadmap/data-modeling/data-vault/ - Data Management Architecture: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/ - Relational Data Warehouse: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/relational-data-warehouse/ - Data Lake: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-lake/ - Modern Data Warehouse: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/modern-data-warehouse/ - Data Fabric: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-fabric/ - Data Mart: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-mart/ - Data Lakehouse: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-lakehouse/ - Data Mesh: https://wiki.databurst.tech/docs/roadmap/data-management-architecture/data-mesh/ - Data Integration: https://wiki.databurst.tech/docs/roadmap/data-integration/ - ETL: https://wiki.databurst.tech/docs/roadmap/data-integration/etl/ - ELT: https://wiki.databurst.tech/docs/roadmap/data-integration/elt/ - CDC: https://wiki.databurst.tech/docs/roadmap/data-integration/cdc/ - Reverse ETL: https://wiki.databurst.tech/docs/roadmap/data-integration/reverse-etl/ - Storage: https://wiki.databurst.tech/docs/roadmap/storage/ - Block Storage: https://wiki.databurst.tech/docs/roadmap/storage/block-storage/ - Object Storage: https://wiki.databurst.tech/docs/roadmap/storage/object-storage/ - File Formats and Serialization: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/ - File Formats: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/ - CSV: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/csv/ - JSON: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/json/ - Parquet: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/parquet/ - XML: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/file-formats/xml/ - Serialization: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/serialization/ - Avro: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/serialization/avro/ - Protocol Buffers: https://wiki.databurst.tech/docs/roadmap/file-formats-and-serialization/serialization/protobuf/ - Query Engine: https://wiki.databurst.tech/docs/roadmap/query-engine/ - Apache Hive: https://wiki.databurst.tech/docs/roadmap/query-engine/hive/ - SparkSQL: https://wiki.databurst.tech/docs/roadmap/query-engine/sparksql/ - Trino: https://wiki.databurst.tech/docs/roadmap/query-engine/trino/ - Presto: https://wiki.databurst.tech/docs/roadmap/query-engine/presto/ - Data Architecture: https://wiki.databurst.tech/docs/roadmap/data-architecture/ - Kappa: https://wiki.databurst.tech/docs/roadmap/data-architecture/kappa/ - Lambda: https://wiki.databurst.tech/docs/roadmap/data-architecture/lambda/ - Data Processing: https://wiki.databurst.tech/docs/roadmap/data-processing/ - Pipeline Orchestration: https://wiki.databurst.tech/docs/roadmap/pipeline-orchestration/ - Messaging and Streaming Platform: https://wiki.databurst.tech/docs/roadmap/messaging-and-streaming-platform/ - Data Governance: https://wiki.databurst.tech/docs/roadmap/data-governance/ - Data Quality: https://wiki.databurst.tech/docs/roadmap/data-governance/data-quality/ - Data Visualization: https://wiki.databurst.tech/docs/roadmap/data-visualization/ - Containerization: https://wiki.databurst.tech/docs/roadmap/containerization/ - Docker: https://wiki.databurst.tech/docs/roadmap/containerization/docker/ - Podman: https://wiki.databurst.tech/docs/roadmap/containerization/podman/ - containerd: https://wiki.databurst.tech/docs/roadmap/containerization/containerd/ - Container Orchestration: https://wiki.databurst.tech/docs/roadmap/container-orchestration/ - Kubernetes: https://wiki.databurst.tech/docs/roadmap/container-orchestration/kubernetes/ - Docker Swarm: https://wiki.databurst.tech/docs/roadmap/container-orchestration/docker-swarm/ - Apache Mesos: https://wiki.databurst.tech/docs/roadmap/container-orchestration/apache-mesos/ - CI/CD: https://wiki.databurst.tech/docs/roadmap/cicd/ - DataOps: https://wiki.databurst.tech/docs/roadmap/cicd/dataops/ - Infrastructure as Code: https://wiki.databurst.tech/docs/roadmap/infrastructure-as-code/ - Configuration Management: https://wiki.databurst.tech/docs/roadmap/infrastructure-as-code/configuration-management/ - Infrastructure Provisioning: https://wiki.databurst.tech/docs/roadmap/infrastructure-as-code/infrastructure-provisioning/ - Observability: https://wiki.databurst.tech/docs/roadmap/observability/ - Logging: https://wiki.databurst.tech/docs/roadmap/observability/logging/ - Monitoring: https://wiki.databurst.tech/docs/roadmap/observability/monitoring/ - Tracing: https://wiki.databurst.tech/docs/roadmap/observability/tracing/ - Glossary: https://wiki.databurst.tech/docs/roadmap/glossary/
$ docker run --rm alpine ps
# Containerization **Containerization** means packaging an application together with everything it needs to run (interpreter, libraries, system packages, config) into one **image**, and running that image as an isolated process called a **container**. The same image runs the same way on a laptop, a CI runner and a production cluster, which ends the "works on my machine" problem. For data engineers this is daily work: an Airflow task, a Spark driver, a dbt run or a Kafka connector is usually a container image pulled from a registry and started by an orchestrator. ## How a container works A container is **not** a small virtual machine. It is a normal Linux process that the kernel fences off with two features: - **Namespaces** give the process its own view of the system: its own process IDs, network interfaces, hostname, mount points and users. - **cgroups** cap what it may consume: CPU, memory, I/O. A Spark executor limited to 4 GB is killed by the kernel if it tries to use 5 GB. The files the process sees come from the **image**: a stack of read-only, content-addressed layers, plus a thin writable layer per container. See [Docker]({{< relref "docker" >}}) for an animated walk-through. {{< fig kicker="$ docker run --memory=256m --cpus=0.5 postgres:18" title="A container is just a Linux process" >}} postgres host PID 4812 a plain process NAMESPACE WITHOUT IT, THE PROCESS SEES WITH IT, THE PROCESS SEES pidall 312 host processes nethost NICs and every port mntthe host's whole disk utshostname host-01 ipchost shared memory userUID 0 is host root pid only its own: postgres is PID 1 net own eth0, IP 172.17.0.2 uts hostname 3f2a9c1d7b4e mnt image layers mounted as / ipc private shared memory user root inside, UID 100000 outside cgroups --memory=256m --cpus=0.5 memory used 180 MB limit 256 MB CPU over 0.5 core: slowed, not killed 300 MB OOM-killed · exit 137 killed by the kernel
  1. Start with an ordinary process on the host. Without any fences it sees every process, every network port, the whole disk and the real hostname.
  2. A pid namespace gives it its own process tree. Inside, postgres is PID 1 and sees no other processes.
  3. A net namespace gives it its own network interface and IP; uts gives it its own hostname (the container ID).
  4. A mnt namespace swaps the filesystem: the image's layers are mounted as /, so the host disk is invisible.
  5. ipc isolates shared memory; a user namespace can map root inside to an unprivileged UID outside. These are the blinders.
  6. cgroups are the budget: at most 256 MB of memory and half a CPU core. Too much CPU only slows it down.
  7. Cross the memory limit and the kernel's OOM killer ends the process. The container exits with code 137.
{{< /fig >}} Try it: `docker run --rm alpine ps` lists a single process, and `docker run --rm alpine hostname` prints a random ID. With no `--memory` or `--cpus` flags there is no ceiling, so one runaway container can starve the whole machine. `--pids-limit` caps the number of processes, which stops fork bombs. ## Containers vs virtual machines {{< fig kicker="$ time docker run --rm alpine true" title="Two ways to isolate the same apps" >}} VIRTUAL MACHINES CONTAINERS hardware hardware hypervisor host OS · one shared Linux kernel guest OSown kernel guest OSown kernel guest OSown kernel container engine (Docker / Podman) 3 kernels to boot, patch and feed RAM 1 kernel, shared by every container App A+ libs App B+ libs App C+ libs App A+ libs App B+ libs App C+ libs size GBs boot ~30 s+ size MBs start under 1 s
  1. Same hardware on both sides. The question is what sits between it and the apps.
  2. VMs run a hypervisor that fakes whole machines. Containers run on the normal host OS and its single Linux kernel.
  3. Every VM boots its own guest OS and kernel. Containers only need a container engine to set up namespaces and cgroups.
  4. The same three apps on top. In a VM each one carries a full OS; in a container it carries only its libraries.
  5. The result: VM images are gigabytes and boot in tens of seconds; container images are megabytes and start like a process.
{{< /fig >}} | | Virtual machine | Container | |---|---|---| | What is isolated | A whole guest OS on virtual hardware | A process tree on the host kernel | | Kernel | One per VM | Shared with the host | | Start time | Tens of seconds (boots an OS) | Milliseconds to a second | | Typical size | GBs | Tens to hundreds of MBs | | Isolation strength | Strong (hypervisor boundary) | Weaker (kernel is shared) | | Runs | Any OS, e.g. Windows on a Linux host | Needs a compatible kernel: Linux containers need Linux | | Good for | Different OSes, hard multi-tenancy | Packaging and scaling apps | They are not rivals. On macOS and Windows, Docker Desktop and Podman run your Linux containers inside a small hidden Linux VM, and cloud Kubernetes nodes are VMs that run many containers. When you need VM-grade isolation for untrusted code, sandboxed runtimes such as **gVisor** or **Kata Containers** sit between the two. ## The standards: OCI The **Open Container Initiative (OCI)** defines three specs: the **image** format, the **runtime** (how to start a container from an unpacked image) and the **distribution** API that registries speak. Because of OCI, an image built with Docker runs under Podman, containerd or Kubernetes unchanged, and can be stored in Docker Hub, GitHub Container Registry, Amazon ECR or Harbor. | Layer | Examples | Who uses it directly | |---|---|---| | Build and developer CLI | Docker, Podman, Buildah | You | | High-level runtime | containerd, CRI-O | Docker Engine, Kubernetes | | Low-level runtime | runc, crun | containerd, Podman | ## What is in this section - [Docker]({{< relref "docker" >}}): the tool that popularized containers. Images, layers, Dockerfiles and Compose. - [Podman]({{< relref "podman" >}}): a daemonless, rootless, Docker-compatible alternative from Red Hat. - [containerd]({{< relref "containerd" >}}): the runtime underneath Docker and most Kubernetes clusters. Once you can run one container, [Container Orchestration]({{< relref "../container-orchestration" >}}) covers running thousands of them across a cluster. ## Common mistakes - **Treating a container like a server.** Do not SSH in and patch it. Change the image and redeploy. - **Storing data in the container's writable layer.** It disappears with the container. Use volumes or object storage. - **Running as root inside the image.** Add a `USER` line; a kernel bug plus root in the container is a host compromise. - **Huge images.** Use slim base images and multi-stage builds so CI and node start-up stay fast. ## Learning Resources - [Open Container Initiative specifications](https://opencontainers.org/) - [What is a container? (Docker)](https://www.docker.com/resources/what-container/) - [Linux namespaces man page](https://man7.org/linux/man-pages/man7/namespaces.7.html) and [cgroups man page](https://man7.org/linux/man-pages/man7/cgroups.7.html) - [Containers from scratch, Liz Rice (talk)](https://www.youtube.com/watch?v=8fi7uSYlOdc): builds a container in a few lines of Go - [What is Containerization? (IBM)](https://www.ibm.com/topics/containerization)