Welcome to Gocker! This project is an educational initiative to learn Go by developing a Docker-like container system from scratch. By building this project, we aim to cover all the features and concepts of the Go programming language, as well as delve into production-grade tools and design patterns.
Gocker is a lightweight container system inspired by Docker. It aims to provide a simplified version of containerization functionalities, allowing users to create, manage, and run containers. This project is designed for learning purposes and is not intended for production use.
- Basic Container Creation: Create and manage containers.
- Resource Isolation: CPU and memory limits for containers.
- Networking: Basic networking capabilities for containers.
- Image Management: Build, list, and remove container images.
- Container Lifecycle Management: Start, stop, and remove containers.
- Simple Orchestration: Manage multiple containers and their interactions.
To get started with Gocker, follow these steps:
-
Clone the repository:
git clone https://github.com/keshan/gocker.git cd gocker
-
Build the project:
go build -o gocker
-
Run Gocker:
./gocker
./gocker create -name mycontainer -image myimage
./gocker start mycontainer
./gocker stop mycontainer
./gocker rm mycontainer
./gocker ps
./gocker build -t myimage .
./gocker images
./gocker rmi myimage
- Basic Container Creation
- Resource Isolation
- Networking
- Image Management
- Container Lifecycle Management
- Simple Orchestration
Gocker is structured to mirror the architecture of Docker, albeit in a simplified form. The core components include:
- CLI: Command-line interface for interacting with Gocker.
- Container: Manages the lifecycle of containers.
- Image: Handles the creation and management of container images.
- Network: Provides basic networking functionalities for containers.
- Volume: Manages data volumes for persistent storage.
- Runtime: Core logic for running containers with resource isolation.
- Logging: Captures and manages logs from containers.
We welcome contributions from the community! To contribute to Gocker, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them with descriptive messages.
- Push your changes to your forked repository.
- Create a pull request to the main repository.
This project is licensed under the MIT License. See the LICENSE file for details.