Skip to content

nixpig/anocir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

610 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸͺ anocir

release build oci-integration containerd-integration cri-integration

[an-oh-cheer] Another OCI Runtime.

An experimental Linux container runtime, implementing the OCI Runtime Spec.

Note

This is a personal project to explore how container runtimes work. It's not production-ready. If you're looking for a production-ready alternative to runc, I think youki is pretty cool.

The process of building this is being documented in a series of blog posts which you can read here: Building a container runtime from scratch in Go.

πŸš€ Quick start

  1. Install using Go: go install github.com/nixpig/anocir/cmd/anocir@latest
  2. View the docs: anocir --help or anocir COMMAND --help

...or download the tarball for your architecture from Releases.

πŸ‘©β€πŸ’» Usage

Caution

Some features may require sudo and make changes to your system. Take appropriate precautions.

Docker

By default, the Docker daemon uses the runc container runtime. anocir can be used as a drop-in replacement for runc.

You can find detailed instructions on how to configure alternative runtimes in the Docker docs. If you just want to quickly experiment, the following should suffice:

Using dockerd flag (temporary)

# 1. Stop any running Docker service
sudo systemctl stop docker.service

# 2. Start the Docker Daemon with added anocir runtime
sudo dockerd --add-runtime anocir=PATH_TO_ANOCIR_BINARY

# 3. Run a container using the anocir runtime
docker run -it --runtime anocir busybox sh

Using daemon.json (permanent)

# 1. Add anocir to Docker's runtime configuration
sudo tee /etc/docker/daemon.json <<EOF
{
    "runtimes": {
        "anocir": {
            "path": "PATH_TO_ANOCIR_BINARY"
        }
    }
}
EOF

# 2. Restart the Docker service
sudo systemctl restart docker

# 3. Run a container using the anocir runtime
docker run -it --runtime anocir busybox sh

CLI

The anocir CLI implements the OCI Runtime Command Line Interface spec.

You can view the docs by running anocir --help or anocir [COMMAND] --help.

βš’οΈ Contributing

Feel free to leave any comments/suggestions/feedback in issues.

πŸ’‘ Inspiration

While this project was built entirely from scratch, inspiration was taken from existing runtimes, in no particular order:

πŸ“ƒ License

MIT

About

πŸͺ An OCI spec-compliant Linux container runtime, written in Go.

Topics

Resources

License

Stars

Watchers

Forks

Contributors