1、设置安装源
apt-get -y install
curl -fsSL https://apt.dockerproject.org/gpg | apt-key add -
apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
add-apt-repository "deb https://apt.dockerproject.org/repo/ debian-$(lsb_release -cs) main"
apt-get -y update
2、安装最新版
apt-get -y install docker-engine
3、安装指定版本
apt-cache policy docker-engine
apt-get -y install docker-engine=<VERSION_STRING>
例如:安装1.12.6版
apt-get -y install docker-engine=1.13.1-0~debian-$(lsb_release -cs)
4、设置不再更新docker
apt-mark hold docker-engine
(责任编辑:IT) |