在Deepin 20上面安装Podman的一种另类方法

本文介绍了为什么选择Podman而非Docker的原因,包括其安全性及性能优势,并详细记录了在Deepin20系统上通过Docker容器安装Podman的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Podman是RedHat开发的容器调度器。为什么要用它而不用Docker呢?因为Docker只能以root权限运行,并且拉取镜像需要访问网络,安全策略难搞。
而Podman支持Rootless mode,且速度更快。因此我打算学习一下。

我的Deepin 20系统上面的apt源没有找到Podman。尝试用源码编译,没成功~

官方文档说Debian 11可直接安装。于是我用Docker运行一个Debian 11试试。

docker run -ti debian:11

在容器里,配置国内源

cat > /etc/apt/sources.list <<EOF
deb http://mirrors.163.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.163.com/debian/ bullseye main non-free contrib
deb http://mirrors.163.com/debian-security/ bullseye-security main
deb-src http://mirrors.163.com/debian-security/ bullseye-security main
deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.163.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib
EOF

apt update

 下载Podman

apt download podman

然后复制到宿主机来安装,当然缺少依赖包。但是挑重要的继续下载:

apt download conmon
apt download containernetworking-plugins
apt download crun
apt download golang-github-containers-common
apt download golang-github-containers-image

一个个复制到宿主机安装起来,竟然成功了!就这点依赖包,Golang大法好,哈哈哈~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值