Ubuntu 18.04 安装docker
参考:
https://www.cnblogs.com/wt7018/p/11880666.html
https://www.runoob.com/docker/ubuntu-docker-install.html
1,安装
>sudo apt-get update
>#安装依赖包
>sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
>#添加 Docker 的官方 GPG 密钥
>curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
>#验证您现在是否拥有带有指纹的密钥
>sudo apt-key fingerprint 0EBFCD88
>#设置稳定版仓库
>sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
2,安装docker社区版
# 更新
$ sudo apt-get update
# 安装最新的Docker-ce
sudo apt-get install docker-ce
# 启动
sudo systemctl enable docker
sudo systemctl start docker
3,测试
sudo docker run hello-world