- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用的是 Ubuntu 18.04(运行模拟 Windows),并且是个新手。我按照以下步骤安装了 Docker,但无法让它运行
。
我用来安装的命令( https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04 ):
882 sudo apt update
883 sudo apt install apt-transport-https ca-certificates curl software-properties-common
884 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
885 sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
886 sudo apt update
887 apt-cache policy docker-ce
888 sudo apt install docker-ce
889 sudo systemctl status docker
890 sudo /etc/init.d/docker start
到目前为止一切顺利。现在要检查是否可以从 Docker Hub 访问和下载镜像,我运行:
sudo docker run hello-world
我收到以下错误:
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
运行sudo dockerd
返回:
INFO[2020-02-22T11:09:04.509355900+08:00] Starting up
INFO[2020-02-22T11:09:04.516510800+08:00] libcontainerd: started new containerd process pid=3705
INFO[2020-02-22T11:09:04.516870500+08:00] parsed scheme: "unix" module=grpc
INFO[2020-02-22T11:09:04.517102600+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-02-22T11:09:04.517288800+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-02-22T11:09:04.517495400+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-02-22T11:09:04.547297900+08:00] starting containerd revision=b34a5c8af56e510852c35414db4c1f4fa6172339 version=1.2.10
INFO[2020-02-22T11:09:04.548738200+08:00] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1
INFO[2020-02-22T11:09:04.548914900+08:00] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1
WARN[2020-02-22T11:09:04.549228300+08:00] 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"
INFO[2020-02-22T11:09:04.549457200+08:00] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1
WARN[2020-02-22T11:09:04.553575600+08:00] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-17763-Microsoft/modules.dep.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-17763-Microsoft\n": exit status 1"
INFO[2020-02-22T11:09:04.553871800+08:00] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.554049900+08:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.554470800+08:00] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.554711200+08:00] skip loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1
INFO[2020-02-22T11:09:04.555303000+08:00] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1
WARN[2020-02-22T11:09:04.556436000+08:00] 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"
WARN[2020-02-22T11:09:04.578612300+08:00] could not use snapshotter aufs in metadata plugin error="modprobe aufs failed: "modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.4.0-17763-Microsoft/modules.dep.bin'\nmodprobe: FATAL: Module aufs not found in directory /lib/modules/4.4.0-17763-Microsoft\n": exit status 1"
WARN[2020-02-22T11:09:04.585873300+08:00] could not use snapshotter zfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin"
INFO[2020-02-22T11:09:04.597785400+08:00] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1
INFO[2020-02-22T11:09:04.605886800+08:00] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1
INFO[2020-02-22T11:09:04.609171800+08:00] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.628196600+08:00] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.645164600+08:00] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.664083400+08:00] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.670739700+08:00] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.689722900+08:00] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.705680600+08:00] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.724497600+08:00] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1
INFO[2020-02-22T11:09:04.743291500+08:00] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2
INFO[2020-02-22T11:09:04.747424800+08:00] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1
INFO[2020-02-22T11:09:04.767781500+08:00] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1
INFO[2020-02-22T11:09:04.783546000+08:00] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1
INFO[2020-02-22T11:09:04.803609700+08:00] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.806843900+08:00] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.824845300+08:00] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.825514100+08:00] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.844268300+08:00] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.862309200+08:00] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.868008900+08:00] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.868593000+08:00] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.887239600+08:00] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1
INFO[2020-02-22T11:09:04.904976000+08:00] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.909043500+08:00] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.926997400+08:00] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.927696200+08:00] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1
INFO[2020-02-22T11:09:04.964084500+08:00] serving... address="/var/run/docker/containerd/containerd-debug.sock"
INFO[2020-02-22T11:09:04.976438300+08:00] serving... address="/var/run/docker/containerd/containerd.sock"
INFO[2020-02-22T11:09:04.995872500+08:00] containerd successfully booted in 0.449319s
INFO[2020-02-22T11:09:05.008892100+08:00] parsed scheme: "unix" module=grpc
INFO[2020-02-22T11:09:05.011750500+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-02-22T11:09:05.033549900+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-02-22T11:09:05.051284400+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-02-22T11:09:05.055568500+08:00] parsed scheme: "unix" module=grpc
INFO[2020-02-22T11:09:05.055766700+08:00] scheme "unix" not registered, fallback to default scheme module=grpc
INFO[2020-02-22T11:09:05.073081000+08:00] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 <nil>}] <nil>} module=grpc
INFO[2020-02-22T11:09:05.090749400+08:00] ClientConn switching balancer to "pick_first" module=grpc
INFO[2020-02-22T11:09:05.104871000+08:00] [graphdriver] using prior storage driver: overlay2
WARN[2020-02-22T11:09:05.152741200+08:00] Your kernel does not support cgroup memory limit
WARN[2020-02-22T11:09:05.153377200+08:00] Unable to find cpu cgroup in mounts
WARN[2020-02-22T11:09:05.153980700+08:00] Unable to find blkio cgroup in mounts
WARN[2020-02-22T11:09:05.154573200+08:00] Unable to find cpuset cgroup in mounts
WARN[2020-02-22T11:09:05.155169600+08:00] mountpoint for pids not found
INFO[2020-02-22T11:09:05.155932100+08:00] Loading containers: start.
WARN[2020-02-22T11:09:05.160351700+08:00] Running iptables --wait -t nat -L -n failed with message: `iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.`, error: exit status 3
INFO[2020-02-22T11:09:05.234905500+08:00] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby
INFO[2020-02-22T11:09:05.235118300+08:00] stopping healthcheck following graceful shutdown module=libcontainerd
INFO[2020-02-22T11:09:05.235126900+08:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby
failed to start 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.1: 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)
我完全迷失在这里,缺乏解决问题的背景 - 我正在参加网络开发类(class),这是很多东西/练习的要求。谢谢!
最佳答案
您无法在适用于 Linux 的 Windows 子系统下运行 Docker。 Docker 依赖于许多 WSL 尚未实现的 Linux 内核功能。您的名字在评论中看起来像这样:
Linux DESKTOP-CD69S60 4.4.0-17763-Microsoft #864-Microsoft Thu Nov 07 15:22:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
17763-Microsoft
是关键部分 - 这意味着您实际上并未运行 Linux 内核,而是运行 WSL 内核(这是 Windows NT 之上的 Linux 的近似版本)。
您需要使用 WSL2(它运行真正的虚拟机,而不是部分 Linux 兼容的内核)或其他虚拟化技术,例如 VMware、Hyper-V 或 VirtualBox。如果您安装了 Hyper-V,由于 Hyper-V 的工作原理,VMware 和 VirtualBox 都将不再可选,因此,如果您发现 Hyper-V 不能满足您的需求,则需要使用 Hyper-V Switcher 之类的工具将其关闭(然后其他虚拟化技术将起作用)。
关于linux - 在 Ubuntu 上安装/运行 Docker 时出现问题(dockerd 错误)/守护进程运行?内核升级?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60348724/
一 点睛 线程可以设置为守护线程,ThreadGroup 也可以设置为守护 ThreadGroup,但是若将一个 ThreadGroup 设置为 deamon,也并不会影响线程的 daemon 属性,
我有一个 python 脚本需要在启动时作为守护进程运行。进程从 tty(和 pdb)分离,但代码不运行。 我已经将它缩小到一个最小的例子 import daemon from time import
reactjs isMounted API 的文档提到: You can use this method to guard asynchronous calls to setState() or fo
我正在开发一个需要嵌入 HTTP 服务器的守护进程。我正在尝试使用 BaseHTTPServer 来完成它,当我在前台运行它时,它工作正常,但是当我尝试将守护进程 fork 到后台时,它停止工作。我的
我正在尝试使用 Apache Commons Daemon 使用 Daemon 接口(interface)来守护我的应用程序。 Java 应用程序本身不执行任何操作,只是写入 stout。 我编译了j
我正在使用 Bootle Python Web Framework 在 Ubuntu 上开发网络应用程序。是否有任何有效的方法来守护启动默认 bottlepy 网络服务器的脚本? 谢谢。 UPD:现在
我一直使用 bluepill成功地守护简单的 Ruby 脚本。然而这一次,我有一个脚本,它也在加载 Rails 环境,因此我可以访问 Rails 应用程序及其各自模型的数据库连接。我使用的 bluep
我试图守护一些代码,但我遇到了一些麻烦。 如果我用 tklogger() 调用代码,它运行得很好。但是,如果我在守护程序上下文中调用它,我会得到以下跟踪信息: Traceback (most rece
我打算使用 systemd 将 celery 4.3.0 作为守护进程运行,但它给了我这个错误: 它会启动 worker 但会很快停止它们。但是,我可以通过键入以下命令手动运行工作人员: celery
我是一名优秀的程序员,十分优秀!