Focker is a toy container runtime written in Go, designed to create and manage lightweight Linux containers.
- Namespace Isolation: Uses Linux namespaces to isolate processes, mount points, and hostname.
- Filesystem Handling: Extracts a base Ubuntu 22.04 filesystem tarball for container use.
- Process Management: Runs specified commands inside isolated containers.
- Bind Mounts: Easy file and directory sharing between host and containers
- Go (tested with go1.21.5)
- Linux kernel with support for namespaces (tested on Ubuntu 22.04, Pop!_OS)
- Requires root privileges to operate due to its use of Linux namespaces.
-
Building
go build -o focker
-
Running Containers
sudo ./focker run <command> [args...]