赞
踩
sudo apt-get update
sudo apt-get install \apt-transport-https \ca-certificates \curl \software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-get install -y docker.io
systemctl start docker
systemctl enable docker
docker version
docker命令前面加上 sudo 即可。
Warning: failed to get default registry endpoint from daemon (Cannot connect to the Docker daemon. Is the docker daemon running on this host?). Using system default: https://index.docker.io/v1/
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
原因:是没有sudo,正确应该是 sudo docker pull ubuntu:16.04
或者通过 How can I use docker without sudo? 的方法解决问题。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。