All Projects → Ripolak → Minict

Ripolak / Minict

Licence: gpl-3.0
A minimal container runtime written in Go that was made mainly for learning purposes and is intended to be as simple as possible.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Minict

Hivedscheduler
Kubernetes Scheduler for Deep Learning
Stars: ✭ 126 (-13.1%)
Mutual labels:  containers
Dockerfiles
Almost all of these live on dockerhub under jess. Because you cannot use notary with autobuilds on dockerhub I also build these continuously on a private registry at r.j3ss.co for public download. (You're welcome.)
Stars: ✭ 12,213 (+8322.76%)
Mutual labels:  containers
Quay
Build, Store, and Distribute your Applications and Containers
Stars: ✭ 1,867 (+1187.59%)
Mutual labels:  containers
Linuxdeploy Cli
Linux Deploy CLI
Stars: ✭ 127 (-12.41%)
Mutual labels:  containers
Ns Process
Code to accompany the "Namespaces in Go" series of articles.
Stars: ✭ 132 (-8.97%)
Mutual labels:  containers
Frameworkcontroller
General-Purpose Kubernetes Pod Controller
Stars: ✭ 139 (-4.14%)
Mutual labels:  containers
P2plab
performance benchmark infrastructure for IPLD DAGs
Stars: ✭ 126 (-13.1%)
Mutual labels:  containers
Ladder
A general purpose extensible autoscaler for the cloud
Stars: ✭ 143 (-1.38%)
Mutual labels:  containers
St2 Docker
StackStorm docker-compose deployment
Stars: ✭ 133 (-8.28%)
Mutual labels:  containers
Vagga
Vagga is a containerization tool without daemons
Stars: ✭ 1,750 (+1106.9%)
Mutual labels:  containers
Ops
Tools&scripts for daily devops.
Stars: ✭ 128 (-11.72%)
Mutual labels:  containers
Miniswarm
Docker Swarm cluster in one command
Stars: ✭ 130 (-10.34%)
Mutual labels:  containers
Examples
DC/OS examples
Stars: ✭ 139 (-4.14%)
Mutual labels:  containers
Ckube
A cli to simplify working with kubectl for some common workflows
Stars: ✭ 127 (-12.41%)
Mutual labels:  containers
Maruos
Your phone is your PC.
Stars: ✭ 1,814 (+1151.03%)
Mutual labels:  containers
Kubler
A generic, extendable build orchestrator.
Stars: ✭ 126 (-13.1%)
Mutual labels:  containers
Hyperstart
The tiny Init service for HyperContainer
Stars: ✭ 135 (-6.9%)
Mutual labels:  containers
Vic Product
vSphere Integrated Containers enables VMware customers to deliver a production-ready container solution to their developers and DevOps teams.
Stars: ✭ 143 (-1.38%)
Mutual labels:  containers
Operos
Linux-based operating system that brings hyperscaler-grade infrastructure automation to organizations of all sizes
Stars: ✭ 144 (-0.69%)
Mutual labels:  containers
Kathara
A lightweight container-based network emulation system.
Stars: ✭ 139 (-4.14%)
Mutual labels:  containers

Minict

Minict is a minimal container runtime written in Go. It was made mainly for learning purposes and is intended to be as simple as possible.

It's main intention is to be easily understandable to anyone who wishes to read it's code and see what goes into running containers in famous runtimes such as Containerd and full container-running platforms like Docker.

Minict runs OCI standard images and supports pulling images from existing registries.

Prerequisites

  • The gpgme-devel package must be installed on your system.
    • Run sudo dnf install gpgme-devel on RHEL-based distros (RHEL, CentOS, Fedora, etc.)
    • Run sudo apt install libgpgme-dev on Debian-based distros (Debian, Ubuntu, etc.)
  • Have golang and git installed.

Usage

  • Either download the current binary from the releases page, or compile with the instuctions below.
  • Once you have the executable, start using it with the help of the Getting started section below or by running the executable with the --help or -h flag.

Building & Running

  • Clone this repository into your $HOME/go/src directory and run cd $HOME/go/src/minict
  • Run the go get command.
  • Run the go build command.
  • You should now have a minict executable in your directory. Run chmod a+x minict and it can now be used.
  • To use it from anywhere easily, move the minict executable to a directory that is in yout PATH variable. One such directory should be /usr/bin.

Getting Started

  • Pulling an image:
sudo minict pull --image ubuntu:20.04
  • Running a new container:
sudo minict run --image ubuntu:20.04 --name ubuntu-ctr
  • Starting an existing container:
sudo minict start --name ubuntu-ctr
  • Listing all images:
>>> sudo minict list-images

[
  "alpine:latest",
  "ubuntu:20.04"
]
  • Listing all containers:
>>> sudo minict list-containers

[
  "container1",
  "container2",
  "alpine-ctr",
  "ubuntu-ctr"
]
  • Removing an existing container:
sudo minict rm --name ubuntu-ctr

Running information

  • Container management is entirely based on the filesystem, and no DBs or separate inventories are used.
  • By default, minict will use the /var/lib/minict directory for everything that it stores on disk. This can be changed by setting the MINICT_DIR environment variable to a new location. For example:
sudo MINICT_DIR=/new/location minict pull --image alpine:3.11

Important Notes & Disclaimers:

  • Since this is intended to be small and minimal project, only basic OCI settings are supported. Currently, minict supports the following features:
    • Cmd / Entrypoint
    • Env variables
    • Mounts - Partial support, some mounts won't work and you might see mounting error when starting containers, but the basic mounts that are required for most containers are supported.
    • Hostname
  • All other OCI settings are ignored.
  • Containers do not start with a networking namespace at the moment. While it is possible to add and there are existing Go libraries and tools to help make that easier, it will cause running containers to not be reachable without implementing more features like port mapping between the host and the containers and more, which is beyond the scope I set for this project at the moment.
  • Minict is in NO way meant to be used in production. This is nothing more than a personal project and I take no responsibility for anything that using it might cause.
  • While I tested this on my personal system and tried my best to cleanup everything once a container is removed, note that it does setup namespaces and mounts on the system, so for completely risk-free usage I'd suggest using it on a VM.

Sources & Other interesting projects

  • Minict used the umoci tool to unpack images, and uses code that was inspired by skopeo to pull images. Check out those projects if you're interested in how its done. Plus they are both great tools in general.
  • bocker is a projects that attmepts to implement Docker in ~100 lines of bash. Not directly related to this project but a cool one nonetheless that you might find interesting if you are interested in this one.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].