tags: container

docker考古:如何确定docker-ce与containerd.io版本对应关系

以ubuntu focal为例

确认docker-ce组件release时间

https://download.docker.com/linux/ubuntu/dists/focal/pool/stable/amd64/

根据docker-ce的发布时间及docker-ce中的依赖关系,可以确定一个containerd.io的大致范围,选取较新版本即可。

../
containerd.io_1.2.13-2_amd64.deb                    2020-07-28 16:39:02 20.4 MiB
containerd.io_1.3.7-1_amd64.deb                     2020-10-08 20:39:20 23.2 MiB
containerd.io_1.3.9-1_amd64.deb                     2020-11-30 22:57:53 23.2 MiB
containerd.io_1.4.3-1_amd64.deb                     2020-12-09 01:55:15 26.8 MiB
containerd.io_1.4.3-2_amd64.deb                     2021-04-08 00:35:52 27.0 MiB
containerd.io_1.4.4-1_amd64.deb                     2021-04-08 00:35:53 27.0 MiB
docker-ce-cli_19.03.10~3-0~ubuntu-focal_amd64.deb   2020-07-28 16:39:03 39.3 MiB
docker-ce-cli_19.03.11~3-0~ubuntu-focal_amd64.deb   2020-07-28 16:39:04 39.3 MiB
docker-ce-cli_19.03.12~3-0~ubuntu-focal_amd64.deb   2020-07-28 16:39:05 39.3 MiB
docker-ce-cli_19.03.13~3-0~ubuntu-focal_amd64.deb   2020-10-08 20:39:21 42.1 MiB
docker-ce-cli_19.03.14~3-0~ubuntu-focal_amd64.deb   2020-12-08 16:25:36 42.1 MiB
docker-ce-cli_19.03.15~3-0~ubuntu-focal_amd64.deb   2021-02-25 07:28:46 42.1 MiB
docker-ce-cli_19.03.9~3-0~ubuntu-focal_amd64.deb    2020-07-28 16:39:06 39.3 MiB
docker-ce-cli_20.10.0~3-0~ubuntu-focal_amd64.deb    2020-12-09 01:55:17 37.3 MiB
docker-ce-cli_20.10.1~3-0~ubuntu-focal_amd64.deb    2021-02-25 07:28:52 39.5 MiB
docker-ce-cli_20.10.2~3-0~ubuntu-focal_amd64.deb    2021-02-25 07:28:52 39.5 MiB
docker-ce-cli_20.10.3~3-0~ubuntu-focal_amd64.deb    2021-02-25 07:28:53 39.5 MiB
docker-ce-cli_20.10.4~3-0~ubuntu-focal_amd64.deb    2021-02-26 15:21:41 39.5 MiB
docker-ce-cli_20.10.5~3-0~ubuntu-focal_amd64.deb    2021-04-08 00:32:24 39.5 MiB
docker-ce-cli_20.10.6~3-0~ubuntu-focal_amd64.deb    2021-04-12 11:34:34 39.5 MiB
docker-ce_19.03.10~3-0~ubuntu-focal_amd64.deb       2020-07-28 16:39:06 21.5 MiB
docker-ce_19.03.11~3-0~ubuntu-focal_amd64.deb       2020-07-28 16:39:07 21.5 MiB
docker-ce_19.03.12~3-0~ubuntu-focal_amd64.deb       2020-07-28 16:39:07 21.5 MiB
docker-ce_19.03.13~3-0~ubuntu-focal_amd64.deb       2020-10-08 20:39:21 21.5 MiB
docker-ce_19.03.14~3-0~ubuntu-focal_amd64.deb       2020-12-08 16:25:36 21.7 MiB
docker-ce_19.03.15~3-0~ubuntu-focal_amd64.deb       2021-02-25 07:28:55 21.7 MiB
docker-ce_19.03.9~3-0~ubuntu-focal_amd64.deb        2020-07-28 16:39:08 21.5 MiB
docker-ce_20.10.0~3-0~ubuntu-focal_amd64.deb        2020-12-09 01:55:21 23.6 MiB
docker-ce_20.10.1~3-0~ubuntu-focal_amd64.deb        2021-02-25 07:28:56 23.6 MiB
docker-ce_20.10.2~3-0~ubuntu-focal_amd64.deb        2021-02-25 07:28:56 23.6 MiB
docker-ce_20.10.3~3-0~ubuntu-focal_amd64.deb        2021-02-25 07:28:57 23.6 MiB
docker-ce_20.10.4~3-0~ubuntu-focal_amd64.deb        2021-02-26 15:21:46 23.6 MiB
docker-ce_20.10.5~3-0~ubuntu-focal_amd64.deb        2021-04-08 00:32:25 23.6 MiB
docker-ce_20.10.6~3-0~ubuntu-focal_amd64.deb        2021-04-12 11:34:37 23.6 MiB
docker-scan-plugin_0.7.0~ubuntu-focal_amd64.deb     2021-04-12 11:34:38 3.7 MiB

下载docker-ce安装包,解压查看control.tar.xz中的control文件,可以获取到依赖信息

st0n3@yoga:~/Downloads$ unar docker-ce_19.03.15_3-0_ubuntu-focal_amd64.deb 
docker-ce_19.03.15_3-0_ubuntu-focal_amd64.deb: Ar
  debian-binary  (4 B)... OK.
  control.tar.xz  (2228 B)... OK.
  data.tar.xz  (22752660 B)... OK.
  _gpgbuilder  (1266 B)... OK.
Successfully extracted to "docker-ce_19.03.15_3-0_ubuntu-focal_amd64".
st0n3@yoga:~/Downloads/docker-ce_19.03.15_3-0_ubuntu-focal_amd64$ unar control.tar.xz 
control.tar.xz: Tar in XZ
  ./  (dir)... OK.
  ./conffiles  (61 B)... OK.
  ./control  (1205 B)... OK.
  ./md5sums  (440 B)... OK.
  ./postinst  (2929 B)... OK.
  ./postrm  (1209 B)... OK.
  ./prerm  (179 B)... OK.
Successfully extracted to "control".
st0n3@yoga:~/Downloads/docker-ce_19.03.15_3-0_ubuntu-focal_amd64$ cd control/
st0n3@yoga:~/Downloads/docker-ce_19.03.15_3-0_ubuntu-focal_amd64/control$ ls
conffiles  control  md5sums  postinst  postrm  prerm
st0n3@yoga:~/Downloads/docker-ce_19.03.15_3-0_ubuntu-focal_amd64/control$ cat control 
Package: docker-ce
Version: 5:19.03.15~3-0~ubuntu-focal
Architecture: amd64
Maintainer: Docker <support@docker.com>
Installed-Size: 107156
Depends: docker-ce-cli, containerd.io (>= 1.2.2-3), iptables, libseccomp2 (>= 2.3.0), libc6 (>= 2.8), libdevmapper1.02.1 (>= 2:1.02.97), libsystemd0
Recommends: aufs-tools, ca-certificates, cgroupfs-mount | cgroup-lite, git, pigz, xz-utils, libltdl7, apparmor
Conflicts: docker (<< 1.5~), docker-engine, docker-engine-cs, docker.io, lxc-docker, lxc-docker-virtual-package
...
st0n3@yoga:~/Downloads/docker-ce_19.03.15_3-0_ubuntu-focal_amd64/control$ 

nightly

// TODO