编辑
2019-07-24
Docker应用与NAS
00
请注意,本文编写于 1531 天前,最后修改于 113 天前,其中某些信息可能已经过时。

mark

目前此操作方法不支持Ubuntu18.04

第一步:添加源

bash
# 下面这个Docker的源 deb https://apt.dockerproject.org/repo ubuntu-xenial main deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

版本对应关系如下:

mark

所以在写的时候这样写就好了

Precise 12.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-precise main

Trusty 14.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-trusty main

Wily 15.10 deb https://apt.dockerproject.org/repo ubuntu-wily main

Xenial 16.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-xenial main

第二步:添加秘钥

bash
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

第三步:apt更新

bash
apt-get update

第四步:查看可选的Docker版本

bash
apt-cache policy docker-engine

mark

第五步:安装想要的版本的Docker

bash
apt install docker-engine=1.11.2-0~xenial

在这个网站查看支持的版本https://apt.dockerproject.org/repo/dists/

本文作者:Tim

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!