debian12安装containerd
时间: 2024-10-08 18:11:49 浏览: 29
在Debian 12 (Bullseye)上安装ContainerD需要几个步骤,因为ContainerD不是默认包管理器apt的一部分。ContainerD通常与Kubernetes等容器管理系统一起使用,你可以按照以下指南进行安装:
1. **更新包列表**:
```
sudo apt update
```
2. **安装依赖**:
ContainerD依赖于gRPC、protobuf和其他一些库,先安装它们:
```
sudo apt install -y curl gnupg lsb-release jq
```
3. **添加ContainerD GPG密钥**:
```
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```
4. **将ContainerD仓库添加到Apt源**:
```
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/containerd.list > /dev/null
```
5. **更新包列表并安装ContainerD**:
```
sudo apt update
sudo apt install containerd.io
```
6. **启动和启用ContainerD服务**:
```
sudo systemctl start containerd
sudo systemctl enable containerd
```
7. **检查安装状态**:
```
sudo docker run hello-world
```
如果一切正常,你应该能看到Hello World消息。
阅读全文