Podman:OCI运行时与安装指南
1. OCI运行时概述
OCI(开放容器倡议)运行时是容器引擎(如Podman)启动的可执行程序,用于配置Linux内核和子系统以运行容器。它读取OCI运行时规范的JSON文件,配置命名空间、安全控制和cgroups,最终启动容器进程。通过 --runtime 选项,可在不同的OCI运行时之间切换。
# 使用crun运行时
$ podman --runtime crun run --rm ubi8 echo hi
hi
# 使用runc运行时
$ podman --runtime /usr/bin/runc run –rm ubi8 echo hi
hi
若要永久更改默认的OCI运行时,可在主目录的 containers.conf 文件的 [engine] 表中设置 runtime 选项。
$ cat > ~/.config/containers/containers.conf << EOF
[engine]
runtime="runc"
EOF
2. 主要的OCI运行时
2.1 runc
runc是原始的OCI运行时,由Docker捐赠给OCI。它用Golang编写,包含 libcontainer 库,被许多容器引擎和Kubernetes使
Podman与OCI运行时详解
超级会员免费看
订阅专栏 解锁全文
78

被折叠的 条评论
为什么被折叠?



