Docker安装与命令
Ubuntu中安装Docker
- 更新ubuntu的apt源索引
sudo apt-get update
- 安装包允许apt通过HTTPS使用仓库
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