ubuntu 14.04,debian 7 and 8 EOL

This commit is contained in:
khs1994
2019-04-29 09:26:29 +08:00
parent 4949de94c4
commit 8576e16b61
14 changed files with 20 additions and 114 deletions

View File

@@ -10,8 +10,6 @@ Docker CE 支持以下版本的 [Debian](https://www.debian.org/intro/about) 操
* Buster 10
* Stretch 9
* Jessie 8 (LTS) (Docker CE v18.06 及以下版本)
* Wheezy 7.7 (EOL) (Docker CE v18.03 及以下版本)
#### 卸载旧版本
@@ -23,16 +21,10 @@ $ sudo apt-get remove docker \
docker.io
```
#### Debian 7 Wheezy
Debian 7 的内核默认为 3.2为了满足 Docker CE 的需求应该安装 [`backports`](https://backports.debian.org/Instructions/) 的内核。
### 使用 APT 安装
由于 apt 源使用 HTTPS 以确保软件下载过程中不被篡改因此我们首先需要添加使用 HTTPS 传输的软件包以及 CA 证书
Debian 8 Jessie 或者 Debian 9 Stretch 使用以下命令:
```bash
$ sudo apt-get update
@@ -45,20 +37,6 @@ $ sudo apt-get install \
software-properties-common
```
Debian 7 Wheezy 使用以下命令
```bash
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
lsb-release \
python-software-properties
```
鉴于国内网络问题强烈建议使用国内源官方源请在注释中查看
为了确认所下载软件包的合法性需要添加软件源的 GPG 密钥
@@ -88,14 +66,6 @@ $ sudo add-apt-repository \
>以上命令会添加稳定版本的 Docker CE APT 如果需要测试或每日构建版本的 Docker CE 请将 stable 改为 test 或者 nightly
Debian 7 需要进行额外的操作
编辑 `/etc/apt/sources.list` deb-src 一行删除或者使用 # 注释
```bash
deb-src [arch=amd64] https://download.docker.com/linux/debian wheezy stable
```
#### 安装 Docker CE
更新 apt 软件包缓存并安装 `docker-ce`
@@ -124,12 +94,6 @@ $ sudo systemctl enable docker
$ sudo systemctl start docker
```
Debian 7 Wheezy 请使用以下命令启动
```bash
$ sudo service docker start
```
### 建立 docker 用户组
默认情况下`docker` 命令会使用 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。