安装依赖
1 |
apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common |
安装Key
1 |
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add - |
添加源
1 |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" |
安装docker-ce
1 2 |
apt-get update apt-get install docker-ce |
测试
1 |
docker run hello-world |
输出
1 2 |
Hello from Docker! This message shows that your installation appears to be working correctly. |
One comment