ubuntu安装docker arm
时间: 2024-11-29 21:11:53 浏览: 6
在Ubuntu系统上安装Docker ARM版本通常适用于那些基于ARM架构(如ARM64或ARMv7)的设备,比如支持ARM的服务器、 Raspberry Pi或一些嵌入式设备。以下是基本步骤:
1. **更新系统**:
```sh
sudo apt-get update && sudo apt-get upgrade
```
2. **安装依赖库**:
```
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
```
3. **添加Docker GPG密钥**:
```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
```
4. **修改apt源**:
```
echo \
"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(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. **验证安装**:
```sh
sudo docker run hello-world
```
阅读全文