Please enable Javascript to view the contents

Docker 20.10.6 拉取某些镜像报错 unlinkat

 ·  ☕ 1 分钟

使用的是 CentOS 7,内核版本 3.10.0-327 。

1. 查看当前 Docker 的版本

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
docker version

Client: Docker Engine - Community
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        370c289
 Built:             Fri Apr  9 22:46:01 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.6
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8728dd2
  Built:            Fri Apr  9 22:44:13 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

能够拉取大部分镜像,但是部分镜像会报错,如下:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
docker pull k8s.gcr.io/kube-proxy:v1.16.12

v1.16.12: Pulling from kube-proxy
83b4483280e5: Pull complete 
cedd2715c2e4: Pull complete 
297e97c9c472: Extracting [==================================================>]  2.052MB/2.052MB
67b649411e75: Download complete 
d97928a1765f: Download complete 
ffa39a529ef3: Download complete 
ed820abd805b: Download complete 
failed to register layer: ApplyLayer exit status 1 stdout:  stderr: unlinkat /var/log/apt: invalid argument

2. 降低 Docker 的版本

  • 卸载 Docker
1
yum remove -y docker*
  • 安装指定版本的 Docker

参考文档,centos-7-安装指定版本的-docker

  • 查看当前安装的版本
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
docker version

Client: Docker Engine - Community
 Version:           20.10.6
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        370c289
 Built:             Fri Apr  9 22:45:33 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b
  Built:            Wed Mar 11 01:25:42 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.4
  GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
 runc:
  Version:          1.0.0-rc93
  GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

微信公众号
作者
微信公众号