当前位置: > Linux发行版 > Debian >

Debian 系统安装 Docker

时间:2021-12-18 16:57来源:linux.it.net.cn 作者:IT

1、设置安装源

apt-get -y install --no-install-recommends apt-transport-https ca-certificates curl software-properties-common
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)
------分隔线----------------------------