如何在 CentOS 上安装 Docker
先决条件:
- CentOS 7 或更高版本
- 具有 root 权限的用户
步骤:
1. 添加 Docker 官方仓库
<code class="bash">sudo yum-config-manager --add-repo https://download.<a style="color:#f60; text-decoration:underline;" href="https://www.php.cn/zt/15865.html" target="_blank">docker</a>.com/<a style="color:#f60; text-decoration:underline;" href="https://www.php.cn/zt/15718.html" target="_blank">linux</a>/<a style="color:#f60; text-decoration:underline;" href="https://www.php.cn/zt/15739.html" target="_blank">centos</a>/docker-ce.repo