我的环境是在vm虚拟机中,Ubuntu17.04
前期安装步骤不过多介绍,下面这个博客就很好
ubuntu16.10安装docker17.03.0-ce并配置国内源和加速器
http://www.cnblogs.com/wish123/p/6501569.html
如果要是以后过时了,也可以看官方文档,现在有两款,CE(社区版)和EE(企业版),视情况选择,我练习就用CE了,EE好像要收费吧。。
https://docs.docker.com/engine/installation/linux/ubuntu/
报错信息:
root@zhaijhubuntu17:~# sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package docker-ce is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'docker-ce' has no installation candidate
一开始查网上的解决方法是这样,但是照做还是一样的报错。
# apt-get update
# apt-get upgrade
# apt-get install <packagename>
原因可能是没找到合适的更新源,通过这样一条命令加进去可以解决,如果再不行就要FQ试试了。
sudo echo "deb https://download.docker.com/linux/ubuntu zesty edge" > /etc/apt/sources.list.d/docker.list sudo apt update && sudo apt install docker-ce