# 更新系统软件包
sudo apt-get update
# 安装必要的依赖包,允许apt通过HTTPS使用仓库
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
# 添加Docker的官方GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# 设置stable版本的Docker APT仓库
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# 再次更新软件包索引
sudo apt-get update
# 安装Docker CE
sudo apt-get install docker-ce
# 验证Docker是否安装成功
sudo docker run hello-world
上一篇:linux给文件赋予权限的命令
下一篇:linux 重启网络
Laravel PHP 深圳智简公司。版权所有©2023-2043 LaravelPHP 粤ICP备2021048745号-3
Laravel 中文站