Bocker is a minimal, educational reimplementation of core container (Docker-like) functionality, done in about a hundred lines of Bash script. Its purpose is not to replace Docker’s full feature set, but to illustrate container primitives—namespaces, cgroups, layering, filesystem manipulation, network namespaces, etc.—in a transparent, minimal form. With bocker you can perform basic operations such as pulling an image, running a container, exec into a container, listing containers, and removing them. Because it's written in shell, it is easy to read, reason about, and adapt for experiments or instructional use. It is not intended for production use due to performance, security, and missing features, but it is a useful tool for learning how containers work under the hood. Many learners and educators reference it when teaching container internals or when debugging container behavior in a minimal environment.
Features
- Implements core container operations: pull, run, images, ps, exec, logs, rm/rmi, commit etc.
- Uses bash and standard system tools (btrfs, iptables, iproute2, cgroups) to manage containers’ isolation and resource limits
- Supports networking via setting up bridge interface and routing/iptables rules for forwarding between container networks and host network
- Allows quotas / resource control via cgroups
- Image layer storage using btrfs filesystem under /var/bocker
- Simple in structure & code, good reference/learning tool for how container system can be built minimally