赞
踩
curl -sSL https://get.docker.com | sudo sh
- # 设置 Docker 开机自启动
- sudo systemctl enable docker
- # 启动 Docker
- sudo systemctl start docker
sudo apt-get remove docker docker-engine docker.io containerd runc
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
$ 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"
$ sudo add-apt-repository \
"deb [arch=armhf] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo add-apt-repository \
"deb [arch=arm64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
$ apt-cache madison docker-ce
$ sudo apt-get install docker-ce=<VERSION_STRING> docker-ce-cli=<VERSION_STRING> containerd.io
$ sudo docker run hello-world
- sudo apt-get remove docker docker-engine docker.io containerd runc
-
- sudo apt-get update
-
- sudo apt-get install \
- apt-transport-https \
- ca-certificates \
- curl \
- gnupg-agent \
- software-properties-common
-
- curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
-
- sudo apt-key fingerprint 0EBFCD88
-
- sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
-
- sudo apt-get update
-
- sudo apt-get install docker-ce docker-ce-cli containerd.io
-
- sudo docker version
然今天发现了个更强的:
前提是
/etc/apt/source.list 是阿里源
apt-get install docker.io
参考:https://docs.docker.com/engine/install/ubuntu/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。