ContainerGO is a lightweight, minimalistic container runtime written in Go.
- Namespace Isolation: Processes run in isolated environments using namespaces for resource segregation.
- Cgroups Implementation: Resource usage (CPU, memory, etc.) is controlled and tracked via cgroups.
- OverlayFS: Efficient container filesystem layering is achieved using OverlayFS.
- System Calls: Utilized low-level system calls to manage container processes and resources.
- OCI Layer: Complied with the Open Container Initiative (OCI) standards for runtime and image specs.
- UnionFS: Combined multiple filesystem layers into a single unified view using UnionFS.
- Container Networking: Configured network interfaces and isolation using virtual Ethernet devices and bridges.
- Image Management: Pulled, stored, and managed container images using registries and local storage.
- Logging and Monitoring: Set up logging and monitoring for container processes and resource usage.
- CLI Development: Built a command-line interface (CLI) to interact with the container runtime.
- Basic CLI Interface: Intuitive command-line interface for managing containers with simple, user-friendly commands.
- Process Management: Start, pause, resume, and stop container processes with ease.
- Image Management: Pull container images from Docker Hub and extract them for local use.
- Resource Isolation: Leverage Linux namespaces and cgroups for process and resource isolation.
- Filesystem Layering: Use OverlayFS for efficient and lightweight container filesystem management.
- Networking Support: Set up isolated network interfaces and bridges for container communication.
- Logging and Monitoring: Built-in logging for tracking container activity and resource usage.
- Security Features: Implement capabilities, seccomp profiles, and user namespaces for secure container execution.
go build -o congo .Once built, you can use congo means containerGO to manage lightweight containers.
./congo run --name <container_name> <image_name> <command>like
./congo run --name ubuntu-container ubuntu /bin/bashThis starts a new container with /bin/bash as the entry point.
./congo pull ubuntuDownloads an ubuntu image from Docker Hub and stores it locally.
./congo extract ubuntuExtracts the pulled image to the appropriate filesystem directory.
./congo pause <PID>Suspends the container process.
./congo resume <PID>Resumes a paused container process.
./congo stop <PID>Terminates the container process.
Feel free to fork the repository and submit pull requests to improve ContainerGO.