Ubuntu快速部署Docker

使用docker进行容器化管理进行持续集成部署

第一步

更新ubuntu的apt源索引

sudo apt-get update

 

第二步

安装包允许apt通过HTTPS使用仓库

sudo dpkg --configure -a
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

第三步

添加Docker官方GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

第四步

设置Docker稳定版仓库

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

第五步

添加仓库后,更新apt源索引

sudo apt-get update

第六步

前面的准备工作完成以后,接下来安装最新版Docker CE(社区版)

sudo apt-get install docker-ce

第七步

检查Docker CE是否安装正确

sudo docker run hello-world

出现了"hello from Docker"则表示上面的安装成功!

posted @ 2020-12-01 14:33  清沙2018  阅读(69)  评论(0)    收藏  举报