gpt4 book ai didi

ubuntu docker 不工作

转载 作者:行者123 更新时间:2023-12-02 19:31:40 25 4
gpt4 key购买 nike

我正在使用 dockerd 运行命令在win10子系统(ubuntu 16.04LTS)中,但它不起作用并显示以下内容:

WARN[2018-06-08T06:48:49.740127000+08:00] Could not set daemon root propagation to shared, this is not generally critical but may cause some functionality to not work or fallback to less desirable behavior dir=/var/lib/docker error="invalid argument" INFO[2018-06-08T06:48:49.753965500+08:00] libcontainerd: started new docker-containerd process pid=386 INFO[0000] starting containerd module=containerd revision=773c489c9c1b21a6d78b5c538cd395416ec50f88 version=v1.0.3 INFO[0000] loading plugin "io.containerd.content.v1.content"... module=containerd type=io.containerd.content.v1 INFO[0000] loading plugin "io.containerd.snapshotter.v1.btrfs"... module=containerd type=io.containerd.snapshotter.v1 WARN[0000] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module=containerd INFO[0000] loading plugin "io.containerd.snapshotter.v1.overlayfs"... module=containerd type=io.containerd.snapshotter.v1 INFO[0000] loading plugin "io.containerd.metadata.v1.bolt"... module=containerd type=io.containerd.metadata.v1 WARN[0000] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" module="containerd/io.containerd.metadata.v1.bolt" INFO[0000] loading plugin "io.containerd.differ.v1.walking"... module=containerd type=io.containerd.differ.v1 INFO[0000] loading plugin "io.containerd.gc.v1.scheduler"... module=containerd type=io.containerd.gc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.containers"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.content"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.diff"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.events"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.healthcheck"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.images"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.leases"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.namespaces"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.snapshots"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.monitor.v1.cgroups"... module=containerd type=io.containerd.monitor.v1 INFO[0000] loading plugin "io.containerd.runtime.v1.linux"... module=containerd type=io.containerd.runtime.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.tasks"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.version"... module=containerd type=io.containerd.grpc.v1 INFO[0000] loading plugin "io.containerd.grpc.v1.introspection"... module=containerd type=io.containerd.grpc.v1 INFO[0000] serving... address="/var/run/docker/containerd/docker-containerd-debug.sock" module="containerd/debug" INFO[0000] serving... address="/var/run/docker/containerd/docker-containerd.sock" module="containerd/grpc" INFO[0000] containerd successfully booted in 0.052238s module=containerd INFO[2018-06-08T06:48:49.848907600+08:00] [graphdriver] using prior storage driver: overlay2 INFO[2018-06-08T06:48:49.875020600+08:00] Graph migration to content-addressability took 0.00 seconds WARN[2018-06-08T06:48:49.875364600+08:00] Your kernel does not support cgroup memory limit WARN[2018-06-08T06:48:49.875838500+08:00] Unable to find cpu cgroup in mounts WARN[2018-06-08T06:48:49.876236300+08:00] Unable to find blkio cgroup in mounts WARN[2018-06-08T06:48:49.877373300+08:00] Unable to find cpuset cgroup in mounts WARN[2018-06-08T06:48:49.888299100+08:00] mountpoint for pids not found INFO[2018-06-08T06:48:49.890328400+08:00] Loading containers: start. WARN[2018-06-08T06:48:49.906233900+08:00] Running modprobe nf_nat failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-17134-Microsoft/modules.dep.bin'
modprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.4.0-17134-Microsoft
, error: exit status 1 WARN[2018-06-08T06:48:49.934145900+08:00] Running modprobe xt_conntrack failed with message: modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-17134-Microsoft/modules.dep.bin'
modprobe: WARNING: Module xt_conntrack not found in directory /lib/modules/4.4.0-17134-Microsoft
, error: exit status 1 Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.0: can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. (exit status 3)



好像是iptables的问题,我试过 sudo apt-get install iptables但无效。

如何运行 docker 守护进程?

最佳答案

WSL(Linux 的 Windows 子系统)只是一个“轻量级”的 linux,而不是一个完整的。

你可以在那里做一些简单的事情,但不保证能正常工作。我认为这个系统更像是一个概念证明,它确实在工作。它并非设计为一个完整的 linux,只是为了在其中运行一些简单的命令。
docker是一个非常繁重的程序,做虚拟化和其他低级的东西。它严重依赖于您无法在 WSL 中模拟的一些内核函数/模块。 iptables ,例如,需要具有低级网络的完整工作内核,因此无法安装。

关于ubuntu docker 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50751230/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com