5

从 Debian 8 升级到 Debian 9期间docker run和之后会出现以下错误:docker build

ERROR: Service 'etherpad' failed to build: OCI runtime create failed: container_linux.go:344: starting container process caused "error loading seccomp filter into kernel: invalid argument": unknown

在运行容器时,我能够解决问题,--seccomp-profile:unconfined但 build 不支持此标志(https://github.com/moby/moby/issues/21105)。我也尝试通过 daemon.json 将它传递给守护进程,但这会在启动期间导致错误。

启用内核支持:

grep CONFIG_SECCOMP= /boot/config-$(uname -r)
CONFIG_SECCOMP=y

码头工人信息:

Containers: 38
Running: 9
Paused: 0
Stopped: 29
Images: 119
Server Version: 18.09.2
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 275
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host 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: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
 seccomp
 WARNING: You're not using the default seccomp profile
 Profile: /root/labs/security/seccomp/seccomp-profiles/default.json
Kernel Version: 3.16.0-7-amd64
Operating System: Debian GNU/Linux 9 (stretch)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.71GiB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

有谁知道如何解决它?非常感谢。

4

1 回答 1

8

TLDR;升级到 Stretch 后重新启动服务器。


您的问题与我遇到的类似。我收到以下错误:

OCI runtime create failed: container_linux.go:345: starting container process caused "error loading seccomp filter into kernel: invalid argument": unknown

从 Jessie 升级到 Stretch 并安装新的 Docker 副本 ( https://docs.docker.com/install/linux/docker-ce/debian/ ) 后出现此问题。

我相信您的问题很相似,因为您的 docker info 输出显示

Kernel Version: 3.16.0-7-amd64

对我来说:

# uname -a
Linux debian 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux

Stretch 应该使用比这更高的内核版本,所以修复是:

# reboot
# uname -a
Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux
于 2019-06-05T17:42:49.930 回答