Skip to content

7csc/nendo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nendo

Nendo is an experimental container runtime implemented in Go. It utilizes libcontainer (the core library of runc), which complies with OCI (Open Container Initiative) standards, allowing for the creation, execution, and management of containers on Linux.

Designed primarily for educational purposes and to understand the inner workings of container runtimes, it adopts a gRPC-based client-server architecture, simulating a configuration closer to real-world operations.

Features

  • Client-Server Architecture: A daemon process runs in the background, operated via a CLI tool through gRPC.
  • Image Management: Supports pulling container images from remote registries like Docker Hub.
  • Basic Container Operations: Supports creating (Run), listing (List), stopping (Stop), and removing (Remove) containers.
  • Simple Implementation: Focuses on core container runtime functionalities by stripping away complex features.

Requirements

  • OS: Linux (Environments where cgroups v2, namespaces, etc., are available)
  • Go: 1.25 or higher
  • Privileges: Root privileges (sudo) are required (for manipulating namespaces and file systems).

Installation

Clone the source code and build the binaries.

1. Clone the repository

git clone https://github.com/7csc/nendo.git
cd nendo

2. Build

Use the make command to build both the daemon (nendo-daemon) and the CLI (nendo-cli).

# Tidy dependencies
go mod tidy

# Build binaries
make build

Upon successful build, binaries will be generated in the bin/ directory.

  • bin/nendo-daemon: Server (Daemon) process
  • bin/nendo-cli: Client CLI tool

Usage

To perform operations, first start the daemon, then send commands via the CLI from another terminal. All operations require sudo (root privileges).

Step 1: Start the Daemon

Start the daemon to listen for requests. Logs will be output to stdout.

sudo ./bin/nendo-daemon
# Or: make daemon

Step 2: Client Operations

Open another terminal and use the CLI tool to perform operations.

Pull an Image

Fetch an image from Docker Hub.

# syntax: sudo ./bin/nendo-cli pull <image_name>
sudo ./bin/nendo-cli pull ubuntu:latest
sudo ./bin/nendo-cli pull alpine:latest

Run a Container

Start a container using a specified image. <id> must be an arbitrary unique string.

# syntax: sudo ./bin/nendo-cli run <image_name> <id> <command>

# Example: Run sleep command in an ubuntu container (runs in background)
sudo ./bin/nendo-cli run ubuntu:latest my-ubuntu "sleep 1000"

Note: The current implementation does not fully support interactive mode (equivalent to -it). Since it runs via the daemon process, stdout is redirected to a log file.

List Containers

Display a list of currently created containers.

sudo ./bin/nendo-cli list

Example Output:

ID              IMAGE           STATUS     CREATED
my-ubuntu       ubuntu:latest   running    2025-12-27T12:00:00Z

Check Logs

Container stdout is recorded in the following file:

sudo cat /var/lib/nendo/containers/<id>/container.log

Stop a Container

Stop a running container.

sudo ./bin/nendo-cli stop my-ubuntu

Remove a Container

Remove a stopped container.

sudo ./bin/nendo-cli rm my-ubuntu

License

MIT License

About

Container Runtime for Education and Learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors