1

有没有人看到/解决了以下问题:

我有一个配置了无根dind的jenkins slave,所有docker命令都可以工作,除了docker run,详细信息和错误如下:

错误:

    docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:319: getting the final child's pid from pipe caused \"EOF\"": unknown.
    ERRO[0004] error waiting for container: context canceled

配置和版本:

uname -a Linux jnlp-5n7x4 4.4.0-1092-aws #103-Ubuntu SMP 2019 年 8 月 27 日星期二 10:21:48 UTC x86_64 Linux

码头工人信息:

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 19.03.8
 Storage Driver: vfs
 Logging Driver: json-file
 Cgroup Driver: none
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
  rootless
 Kernel Version: 4.4.0-1092-aws
 Operating System: Alpine Linux v3.11 (containerized)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 3.812GiB
 Name: jnlp-5n7x4
 ID: X54B:QFRO:NKMQ:YJMW:NEVU:QU2A:VDHC:RJBI:M3YQ:KUU6:C4N7:IXNN
 Docker Root Dir: /home/jenkins/.local/share/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

提前致谢

4

1 回答 1

2

我能够通过为 docker 使用不同的默认运行时来解决该问题。

#update default runtime
RUN wget -O crun  https://github.com/containers/crun/releases/download/0.13/crun-0.13-static-x86_64 \
&& cp crun /usr/local/bin \
&& chmod a+x /usr/local/bin/crun \
&& chown -R rootless:rootless /usr/local/bin/crun

然后使用主管启动服务,显示配置文件:

[program:docker]
command=/home/rootless/bin/dockerd-rootless.sh --experimental --default- 
runtime crun --add-runtime crun=/usr/local/bin/crun --storage-driver vfs
autorestart=true
user=rootless

详细讨论在这里:

https://github.com/moby/moby/issues/40068

于 2020-04-20T11:57:26.367 回答