armbian安装docker.io
时间: 2024-09-12 16:03:56 浏览: 126
Armbian是一个基于Debian的Linux发行版,特别适合ARM架构设备,如Raspberry Pi。要在Armbian系统上安装Docker,你可以按照以下步骤操作:
1. **更新包列表**:
```
sudo apt update
```
2. **安装依赖**:
```
sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release
```
3. **添加Docker GPG key**:
```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```
4. **修改apt源**:
添加Docker仓库到你的sources.list文件(通常位于 `/etc/apt/sources.list.d/docker.list`),如果不存在则创建:
```bash
echo "deb [arch=armhf 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/docker.list > /dev/null
```
5. **刷新并安装Docker**:
```
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
```
6. **启动和启用Docker服务**:
```
sudo systemctl start docker
sudo systemctl enable docker
```
7. **验证安装**:
可以运行 `docker run hello-world` 来测试Docker是否已成功安装。
阅读全文