Một mục mã nguồn mở trong kho dữ liệu GitHub của TopGit: containers/crun, 4.2k sao, C. A fast and lightweight fully featured OCI runtime and C library for running containers
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
While most of the tools used in the Linux containers ecosystem are
written in Go, I believe C is a better fit for a lower level tool like a
container runtime. runc, the most used implementation of the OCI runtime
specs written in Go, re-execs itself and use a module written in C for
setting up the environment before the container process starts.
crun aims to be also usable as a library that can be easily included in
programs without requiring an external process for managing OCI
containers.
Performance
crun is faster than runc and has a much lower memory footprint.
This is the elapsed time on my machine for running sequentially 100
containers, the containers run /bin/true:
crun
runc
%
100 /bin/true
0:01.69
0:3.34
-49.4%
crun requires fewer resources, so it is also possible to set stricter
limits on the memory allowed in the container:
# podman --runtime /usr/bin/runc run --rm --memory 4M fedora echo it works
Error: container_linux.go:346: starting container process caused "process_linux.go:327: getting pipe fds for pid 13859 caused \"readlink /proc/13859/fd/0: no such file or directory\"": OCI runtime command not found error
# podman --runtime /usr/bin/crun run --rm --memory 512k fedora echo it works
it works
Note that Tumbleweed requires you to specify libseccomp's header file location
as a compiler flag.
# ./autogen.sh
# ./configure CFLAGS='-I/usr/include/libseccomp'
# make
Build
Unless you are also building the Python bindings, Python is needed only
by libocispec to generate the C parser at build time, it won't be used
afterwards.
Once all the dependencies are installed:
$ ./autogen.sh
$ ./configure
$ make
To install into default PREFIX (/usr/local):
$ sudo make install
Shared Libraries
The previous build instructions do not enable shared libraries, therefore you will be unable to use libcrun. If you wish to build the shared libraries you can change the previous ./configure statement to ./configure --enable-shared.
Static build
It is possible to build a statically linked binary of crun by using the
officially provided
nix
package and the derivation of it within this repository. The
builds are completely reproducible and will create a x86_64/amd64
stripped ELF binary for glibc.
Nix
To build the binaries by locally installing the nix package manager:
containers/crun có 4.2k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/containers/crun. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
TopGit chưa ghi nhận URL trang chủ cho containers/crun. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
containers/crun còn đang phát triển không?
Commit gần nhất trên containers/crun là 6 ngày trước (theo timestamp GitHub). Repo có 461 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
containers/crun dùng license gì?
containers/crun phát hành theo license GPL-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
containers/crun viết bằng ngôn ngữ gì?
containers/crun chủ yếu viết bằng C. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về containers/crun ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/containers/crun là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
crun có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về crun.