{"id":18555247,"url":"https://github.com/c3d/ociplex","last_synced_at":"2025-05-15T12:09:50.701Z","repository":{"id":179466724,"uuid":"663501694","full_name":"c3d/ociplex","owner":"c3d","description":"An OCI runtime multiplexer","archived":false,"fork":false,"pushed_at":"2023-09-29T16:10:38.000Z","size":57,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T11:16:08.741Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-07T12:47:42.000Z","updated_at":"2023-07-07T14:27:41.000Z","dependencies_parsed_at":"2023-10-01T03:00:53.717Z","dependency_job_id":null,"html_url":"https://github.com/c3d/ociplex","commit_stats":null,"previous_names":["c3d/ociplex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fociplex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fociplex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fociplex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3d%2Fociplex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c3d","download_url":"https://codeload.github.com/c3d/ociplex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337596,"owners_count":22054254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T21:25:46.578Z","updated_at":"2025-05-15T12:09:50.676Z","avatar_url":"https://github.com/c3d.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ociplex - An OCI multiplexer\n\nThe `ociplex` tool is an OCI runtime multiplexer.\n\nThe primary usage for `ociplex` is to act as a gateway between OCI-only runtime\nengines like `podman` and semi-compliant runtimes like Kata Containers (which,\nafter version 2.0, only supports the `shimv2` interface).\n\nHowever, `ociplex` features several back-ends, which makes it possible to target\nanother OCI runtime, for example to add additional logging or debugging\ncapability.\n\n## Building\n\nAt the moment, this requires a custom version of the [`liboci-cli` crate][oci]\n\n[oci]: https://github.com/c3d/youki/tree/liboci-ociplex\n\n\n## Testing\n\nThe OCI runtimes must obey [the OCI specification][ocispec].\n\n[ocispec]: https://github.com/opencontainers/runtime-tools/blob/master/docs/command-line-interface.md\n\nTesting is done through the standard OCI runtime test suite:\n\n```\n$ git clone git@github.com:opencontainers/runtime-tools.git\n$ cd runtime-tools\n$ make runtimetest validation-executables\n```\n\nSome dependencies are necessary for the test suite to work well:\n\n```\n$ npm install tap\n```\n\nYou can check that the test suite works for you as follows:\n\n```\n$ sudo -E make RUNTIME=/usr/local/bin/runc localvalidation\n```\n\nThen you can use it to run your tests with `ociplex` as the runtime.\n\nNote that the test suite is sensitive to the environment, and getting it to\npass fully is difficult. Current results of this test suite on my machine:\n\n* `runc`:\n  ```\n  Suites:   ​25 failed​, ​25 passed​, ​8 skip​, ​58 of 58 completed\n  Asserts:   ​ ​​​80 failed​, ​3357 passed​, ​466 skip​, ​of 3903\n  ```\n\n* `crun`:\n  ```\n  Suites:   ​23 failed​, ​27 passed​, ​8 skip​, ​58 of 58 completed\n  Asserts:   ​ ​​​45 failed​, ​3642 passed​, ​505 skip​, ​of 4192\n  ```\n\n* `youki`:\n  ```\n  Suites:   ​48 failed​, ​1 passed​, ​9 skip​, ​58 of 58 completed\n  Asserts:   ​ ​​​73 failed​, ​23 passed​, ​9 skip​, ​of 105\n  ```\n\n### Running individual tests\n\nYou can run individual tests in `runtime-tools` as follows:\n\n```\n$ RUNTIME=/usr/bin/runc ./validation/start/start.t\n```\n\n### OCI bundle creation\n\nYou can use the tools to easily create an OCI bundle:\n\n```\n$ mkdir my-test\n$ cd my-test\n$ mkdir rootfs\n$ ../oci-runtime-tool generate --output config.json\n$ ../oci-runtime-tool validate\nBundle validation succeeded.\n$ cd rootfs\n$ tar xvfz ../../../../rootfs-amd64.tar.gz\n```\n\n\n### Example of high-level testing with `podman`\n\nThere are several examples of back-ends in the [examples/](examples) directory.\nWe will use the [configuration example][crun] to run the `cli` backend with\n`/bin/crun` as the next OCI runtime.\n\n[crun]: examples/cli-runc.toml\n\nSince `'podman` expects a single argument for its `--runtime` option, which is a\npath ot a runtime executable, we will need to create a small wrapper to act as\nthis binary, that runs the `debug` build of `ociplex` in the same directory:\n\n```\n#!/bin/bash\nDIR=$(dirname $0)\nBIN=$DIR/target/debug/ociplex\n$BIN --backend $DIR/examples/cli-crun.toml --debug \"$@\"\n```\n\nThis uses the `cli-crun.toml` example file as the backend, and passes the global\n`--debug` option to `ociplex`. You can now run `podman` with it, knowing that\n`podman` will expect a full path to your \"runtime\":\n\n```\n podman --runtime $PWD/run-ociplex run -it fedora bash\n[root@039750cf2130 /]# exit\nexit\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc3d%2Fociplex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc3d%2Fociplex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc3d%2Fociplex/lists"}