ubuntu 安装 docker教程
时间: 2023-11-24 21:45:56 浏览: 63
在Ubuntu上安装Docker的教程如下:
1. 首先,检查并卸载旧版本的Docker。
2. 打开终端,执行以下命令来添加Docker的软件源:sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
3. 更新软件包列表:sudo apt update
4. 安装Docker:sudo apt install docker-ce
5. 验证Docker是否成功安装:sudo docker run hello-world
相关问题
ubuntu安装docker教程
以下是Ubuntu安装Docker的教程:
1. 更新apt包索引:
```
sudo apt-get update
```
2. 安装Docker的依赖包:
```
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
```
3. 添加Docker的官方GPG密钥:
```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```
4. 添加Docker的APT仓库:
```
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```
5. 再次更新apt包索引:
```
sudo apt-get update
```
6. 安装Docker:
```
sudo apt-get install docker-ce
```
7. 确认Docker安装成功:
```
sudo docker run hello-world
```
如果一切正常,你将看到Docker容器输出“Hello from Docker!”
linuxubuntu安装docker教程
您按照以下步骤在Linux Ubuntu上安装Docker:
1. 首先,确保您的Ubuntu版本是支持的。Docker支持以下Ubuntu版本:Hirsute 21.04, Groovy 20.10, Focal 20.04和Bionic 18.04。 https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```
- 执行以下命令更新软件包列表并安装Docker引擎:
```
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
```
3. 如果您无法使用存储库安装Docker,可以使用以下步骤进行手动安装:
- 访问https://download.docker.com/linux/ubuntu/dists/,选择您的Ubuntu版本。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Ubuntu的docker详细安装教程](https://blog.csdn.net/weixin_50999155/article/details/119581698)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Ubuntu 下安装Docker----详细安装教程](https://blog.csdn.net/qq_45737042/article/details/120023198)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文