文章内容
2020/10/8 15:01:46,作 者: 黄兵
Ubuntu 18.04 安装 Docker
最近在学习Docker,正好有一台Ubuntu服务器闲置,于是在Ubuntu上开始安装Docker,具体步骤记录下来。
首先执行的第一个命令用于确保运行的不是旧版本Docker,Docker包更改过几次名称,删除旧的名称:
sudo apt-get remove docker docker-engine docker.io
更新一下系统:
sudo apt-get update
接下来安装Docker Community Edition所需要的软件依赖和apt仓库。这样才能获取并安装Docker相关的包,而且确保相关的包有正确的签名。
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 -
使用以下命令来设置稳定的存储库:
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
安装DOCKER引擎
更新apt程序包索引,并安装最新版本的Docker Engine和容器:
sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io
设置每次引导系统时启动Docker:
sudo systemctl enable docker
启动Docker:
sudo systemctl start docker
测试安装Docker:
docker run --rm -ti ubuntu:latest /bin/bash
这里ubuntu:latest都是Docker映像名称外加映像的标签。
参考资料:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 160: invalid start byte
scp not a regular file 问题
scp not a regular file 问题
评论列表