阿里云轻量应用服务器环境搭建-Ubuntu安装Docker环境
阿里云轻量应用服务器环境搭建-Ubuntu安装Docker环境工具:XShell服务器:阿里云轻量应用服务器,Ubuntu 16.04参考链接:https://yq.aliyun.com/articles/110806Ubuntu安装Docker环境step 1: 安装系统工具sudo apt-get updatesudo apt-get -y install apt-transport-http
·
阿里云轻量应用服务器环境搭建-Ubuntu安装Docker环境
- 工具:XShell
- 服务器:阿里云轻量应用服务器,Ubuntu 16.04
Ubuntu安装Docker环境
- step 1: 安装系统工具
sudo apt-get update

sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common

- step 2:安装GPG证书
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

- step 3:写入软件源信息
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

- Step 4:更新并安装Docker-CE
sudo apt-get -y update

sudo apt-get -y install docker-ce

- 配置镜像加速器
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://zbe10alu.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-vfZQm8wt-1593748308819)(markdown-img/image-20200310223629298.png)]](https://i-blog.csdnimg.cn/blog_migrate/4333d103ec2f445665cadbf911137116.png)
- 安装校验
docker version
![[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-bbgfPehA-1593748308820)(markdown-img/image-20200310223757055.png)]](https://i-blog.csdnimg.cn/blog_migrate/fd9dedc81bffc0709aba94065ca86d18.png)
至此,docker环境安装完成
- Docker查看镜像
docker images

- Docker在运行的容器中执行命令
docker exec -it 容器名 /bin/bash # 进入
exit # 退出
创作不易,喜欢的话加个关注点个赞,谢谢谢谢谢谢!
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐


所有评论(0)