Git Product home page Git Product logo

youki's Introduction

youki

Experimental implementation of the oci-runtime in Rust

License: MIT

Overview

youki is an implementation of runtime-spec in Rust, referring to runc. This project is in the experimental stage at this point. I think Rust is one of the best languages to implement oci-runtime, so I'm having fun experimenting with it.

Building

Two types of building are available: devcontainer or local. You can choose whichever you like, but the local one will only work on Linux.

Local

Requires

  • Rust(See here)
  • Docker

Building

$ git clone [email protected]:utam0k/youki.git
$ cargo build
$ RUST_BACKTRACE=full YOUKI_LOG_LEVEL=debug YOUKI_MODE=/var/lib/docker/containers/ dockerd --experimental --add-runtime="youki=$(pwd)/target/x86_64-unknown-linux-gnu/debug/youki"

Devcontainer

We prepared devcontainer as a development environment. If you use devcontainer for the first time, please refer to this page.

The following explanation assumes that devcontainer is used. The first time it starts up will take a while, so have a cup of coffee and wait ;)

Requires

  • VSCode
  • Docker

Bulding

This commands should be run runs in your local terminal.

$ git clone [email protected]:utam0k/youki.git
$ code youki

And use devcontainer in your vscode.

dockerd is already running when you start devcontainer. You can get more information about the startup process by referring to .devcontainer/scripts/init.sh.

Usage

youki with Docker

$ docker run -it --rm --runtime youki hello-world
$ docker run -it --rm --runtime youki busybox

Integration test

$ /workspaces/youki/.devcontainer/scripts/setup_test.sh # only the first time
$ /workspaces/youki/.devcontainer/scripts/test.sh

HelloWorld with youki

Do Hello, World using the log function of Youki. If you want to explore youki, please use it.

Try adding the following code to the line in src/main.rs after initializing the logger of the main function and try to cargo build in your terminal.

log::debug!("Hello, World");

When you run busybox, sh will start and stop.

$ docker run -it --rm --runtime youki --name youki busybox

If you run the following command in a different terminal, you will see the Hello, World that you added above.

$ docker logs youki

Features

  • somehow works
  • run with docker
  • namespace
  • capabilities
  • cgroups v1
    • devices
    • cpu
    • cpuacct
    • cpuset
    • memory
    • freezer
    • net_cls
    • blkio
    • perf_event
    • net_prio
    • hugetlb
    • pids
    • rdma
  • rlimits
  • hooks

Contribution

This project welcomes your PR and issues. For example, refactoring, adding features, correcting English, etc. If you need any help, you can contact me on Twitter.

youki's People

Contributors

aoki avatar succie avatar utam0k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.