karakuri
is a container runtime for small-scale development environments.
karakuri
provides the following features.
- Management of container lifecycle, including creation, running, and removal
- Support for image pulling from Docker Hub and Private Registry
- Support for image pushing to Priavte Registry
- Support for image build
- Supports on x86_64 and Arm architecture
- Resourcce limitation of containers by cgroup v2
- Container grouping and isolation network by namespace
- Management and execution of core functions (e.g. dns, ingress, etc) through module functionality
- Connecting to remote node and managing container
- Connecting to the Registry and Repository/Tag Management
karakuri
consists of three components.
karakuri
A CLI tool that provides the ability to send requests to high-level container runtime.hitoha
High-level container runtime.
Runs as a daemon process and performs container networking, lifecycle management and image management.
hitoha
provides a REST API as an interface and executes low-level container runtime in response to received requests.
In addition,hitoha
will provide add-on functions such as module functions and registry connection functions.futaba
Low-level container runtime.
futaba
provides actual container operation, including namespace isolation, mounts, root filesystem changes, etc.
Before building karakuri
, must install some utilitis.
On Ubuntu/Debian:
$ snap install go --classic
$ apt update && apt install -y cgroup-tools iptables
And also you'll need to edit pkgs/host_info.go
according to your environment.
Change the host's NIC:HOST_NIC
, OS:HOST_OS
and architecture:HOST_ARCH
as necessary.
// ====================================
//
// Edit to match your environment
//
// ====================================
const (
// Set your host nic
HOST_NIC = "eth0"
//HOST_NIC = "wlan0"
// Set your os/architecture
HOST_OS = "linux"
HOST_ARCH = "amd64"
//HOST_ARCH = "arm"
)
This parameter is used to specify the architecture for the container network setup and image pulling.
If this parameter is different from the execution environment, the container may not be set up correctly.
$ git clone https://github.com/pyxgun/karakuri.git
$ cd karakuri
$ sh scripts/build.sh
$ sudo karakuri run --rm --it --image hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
:
The following is how to run container lifecycle.
Retrieve an image from registry.
This operation is optional because if an image that doesn't exist local is specified when create
command is executed, the image is automatically retrieved.
$ sudo karakuri pull --image alpine
Check the local image list.
$ sudo karakuri images
REPOSITORY | TAG | ID
----------------+---------------+-----------------
alpine | latest | b0c9d60fc5e3
Create a container.
$ sudo karakuri create --name mycontainer --image alpine
Check container list.
$ sudo karakuri ls
CONTAINER ID | Name | IMAGE | STATUS | PORT | COMMAND
-------------+-------------+--------+---------+------+---------------
52e579b39313 | mycontainer | alpine | created | | /bin/sh
Start the container.
$ sudo karakuri start --name mycontainer --it
/ #
--it
option is specified when executing commands that require standard output, such as shell and other interactive tools.
Delete the container
$ sudo karakuri rm --name mycontainer
You can manage the local image storage.
$ sudo karakuri images
REPOSITORY | TAG | ID
--------------+-----------+-----------------
python | alpine | 6cf03fe1f23a
nginx | alpine | d41a14a4ecff
alpine | latest | b0c9d60fc5e3
$ sudo karakuri rmi --id [IMAGE_ID]
- Examples create container - Some examples on container creation
- Node Controller - Manage
karakuri
remotely - Registry Contrroller - Manage private registry
- Command List -
karakuri
Command list - Container Specification - Specifications of containers operated by
Karakuri
The code and docs are released under the MIT license.