在Alpine Linux上使用Docker(Raspberry Pi 3)

在Alpine Linux上使用Docker(Raspberry Pi 3),docker,raspberry-pi,raspberry-pi3,alpine,Docker,Raspberry Pi,Raspberry Pi3,Alpine,我已经在Raspberry Pi 3上安装了Alpine Linux 3.9.2,我想使用Docker。 我遵循了此文档,但它不起作用: 当我想运行Docker命令时,我有以下错误: INFO[2019-04-05T22:15:53.403088830+02:00] libcontainerd: started new containerd process pid=2066 INFO[2019-04-05T22:15:53.404717623+02:00] parsed scheme: "un

我已经在Raspberry Pi 3上安装了Alpine Linux 3.9.2,我想使用Docker。 我遵循了此文档,但它不起作用:

当我想运行Docker命令时,我有以下错误:

INFO[2019-04-05T22:15:53.403088830+02:00] libcontainerd: started new containerd process  pid=2066
INFO[2019-04-05T22:15:53.404717623+02:00] parsed scheme: "unix" module=grpc
INFO[2019-04-05T22:15:53.405058142+02:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2019-04-05T22:15:53.405650900+02:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}]  module=grpc
INFO[2019-04-05T22:15:53.405853607+02:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2019-04-05T22:15:53.406240428+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4422380, CONNECTING  module=grpc
INFO[2019-04-05T22:15:53.584571488+02:00] starting containerd revision=9754871865f7fe2f4e74d43e2fc7ccd237edcbce version=v1.2.2
INFO[2019-04-05T22:15:53.588880423+02:00] loading plugin "io.containerd.content.v1.content"...  type=io.containerd.content.v1
INFO[2019-04-05T22:15:53.589623596+02:00] loading plugin "io.containerd.snapshotter.v1.btrfs"...  type=io.containerd.snapshotter.v1
WARN[2019-04-05T22:15:53.590972703+02: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[2019-04-05T22:15:53.591559158+02:00] loading plugin "io.containerd.snapshotter.v1.aufs"...  type=io.containerd.snapshotter.v1
WARN[2019-04-05T22:15:53.600254736+02:00] failed to load plugin io.containerd.snapshotter.v1.aufs  error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found in directory /lib/modules/4.19.26-0-rpi2\n": exit status 1"
INFO[2019-04-05T22:15:53.600996554+02:00] loading plugin "io.containerd.snapshotter.v1.native"...  type=io.containerd.snapshotter.v1
INFO[2019-04-05T22:15:53.601613999+02:00] loading plugin "io.containerd.snapshotter.v1.overlayfs"...  type=io.containerd.snapshotter.v1
INFO[2019-04-05T22:15:53.602550609+02:00] loading plugin "io.containerd.snapshotter.v1.zfs"...  type=io.containerd.snapshotter.v1
WARN[2019-04-05T22:15:53.603867060+02:00] failed to load plugin io.containerd.snapshotter.v1.zfs  error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
INFO[2019-04-05T22:15:53.604399765+02:00] loading plugin "io.containerd.metadata.v1.bolt"...  type=io.containerd.metadata.v1
WARN[2019-04-05T22:15:53.604912627+02: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[2019-04-05T22:15:53.605363302+02:00] could not use snapshotter aufs in metadata plugin  error="modprobe aufs failed: "modprobe: FATAL: Module aufs not found in directory /lib/modules/4.19.26-0-rpi2\n": exit status 1"
WARN[2019-04-05T22:15:53.605822205+02: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"
INFO[2019-04-05T22:15:53.606854491+02:00] loading plugin "io.containerd.differ.v1.walking"...  type=io.containerd.differ.v1
INFO[2019-04-05T22:15:53.607398447+02:00] loading plugin "io.containerd.gc.v1.scheduler"...  type=io.containerd.gc.v1
INFO[2019-04-05T22:15:53.608048235+02:00] loading plugin "io.containerd.service.v1.containers-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.608804116+02:00] loading plugin "io.containerd.service.v1.content-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.609144062+02:00] loading plugin "io.containerd.service.v1.diff-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.609330884+02:00] loading plugin "io.containerd.service.v1.images-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.609514998+02:00] loading plugin "io.containerd.service.v1.leases-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.609688330+02:00] loading plugin "io.containerd.service.v1.namespaces-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.609862079+02:00] loading plugin "io.containerd.service.v1.snapshots-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.610029839+02:00] loading plugin "io.containerd.runtime.v1.linux"...  type=io.containerd.runtime.v1
INFO[2019-04-05T22:15:53.610738845+02:00] loading plugin "io.containerd.runtime.v2.task"...  type=io.containerd.runtime.v2
INFO[2019-04-05T22:15:53.611115770+02:00] loading plugin "io.containerd.monitor.v1.cgroups"...  type=io.containerd.monitor.v1
INFO[2019-04-05T22:15:53.614778927+02:00] loading plugin "io.containerd.service.v1.tasks-service"...  type=io.containerd.service.v1
INFO[2019-04-05T22:15:53.615223665+02:00] loading plugin "io.containerd.internal.v1.restart"...  type=io.containerd.internal.v1
INFO[2019-04-05T22:15:53.615724235+02:00] loading plugin "io.containerd.grpc.v1.containers"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.615954025+02:00] loading plugin "io.containerd.grpc.v1.content"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.616124597+02:00] loading plugin "io.containerd.grpc.v1.diff"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.616284961+02:00] loading plugin "io.containerd.grpc.v1.events"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.616442356+02:00] loading plugin "io.containerd.grpc.v1.healthcheck"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.616604178+02:00] loading plugin "io.containerd.grpc.v1.images"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.616762667+02:00] loading plugin "io.containerd.grpc.v1.leases"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.616921312+02:00] loading plugin "io.containerd.grpc.v1.namespaces"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.617079436+02:00] loading plugin "io.containerd.internal.v1.opt"...  type=io.containerd.internal.v1
INFO[2019-04-05T22:15:53.617448652+02:00] loading plugin "io.containerd.grpc.v1.snapshots"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.617632141+02:00] loading plugin "io.containerd.grpc.v1.tasks"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.617796619+02:00] loading plugin "io.containerd.grpc.v1.version"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.617985785+02:00] loading plugin "io.containerd.grpc.v1.introspection"...  type=io.containerd.grpc.v1
INFO[2019-04-05T22:15:53.619394163+02:00] serving... address="/var/run/docker/containerd/containerd-debug.sock"
INFO[2019-04-05T22:15:53.620049732+02:00] serving... address="/var/run/docker/containerd/containerd.sock"
INFO[2019-04-05T22:15:53.623102163+02:00] containerd successfully booted in 0.039372s
INFO[2019-04-05T22:15:53.629839627+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4422380, READY  module=grpc
INFO[2019-04-05T22:15:53.703799224+02:00] parsed scheme: "unix" module=grpc
INFO[2019-04-05T22:15:53.704099743+02:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2019-04-05T22:15:53.704665105+02:00] parsed scheme: "unix" module=grpc
INFO[2019-04-05T22:15:53.704957655+02:00] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2019-04-05T22:15:53.704828385+02:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}]  module=grpc
INFO[2019-04-05T22:15:53.705844577+02:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2019-04-05T22:15:53.706631552+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4b46050, CONNECTING  module=grpc
INFO[2019-04-05T22:15:53.713547087+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4b46050, READY  module=grpc
INFO[2019-04-05T22:15:53.721105275+02:00] ccResolverWrapper: sending new addresses to cc: [{unix:///var/run/docker/containerd/containerd.sock 0  <nil>}]  module=grpc
ERRO[2019-04-05T22:15:53.721117619+02:00] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.  storage-driver=overlay2
INFO[2019-04-05T22:15:53.721767407+02:00] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2019-04-05T22:15:53.726137123+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4b461c0, CONNECTING  module=grpc
INFO[2019-04-05T22:15:53.727412793+02:00] blockingPicker: the picked transport is not ready, loop back to repick  module=grpc
INFO[2019-04-05T22:15:53.731906727+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4b461c0, READY  module=grpc
ERRO[2019-04-05T22:15:53.737228052+02:00] AUFS was not found in /proc/filesystems storage-driver=aufs
ERRO[2019-04-05T22:15:53.748563980+02:00] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.  storage-driver=overlay
INFO[2019-04-05T22:15:53.763299733+02:00] Graph migration to content-addressability took 0.00 seconds
WARN[2019-04-05T22:15:53.764225249+02:00] Your kernel does not support cgroup memory limit
WARN[2019-04-05T22:15:53.764418008+02:00] Your kernel does not support cgroup cfs period
WARN[2019-04-05T22:15:53.764528997+02:00] Your kernel does not support cgroup cfs quotas
WARN[2019-04-05T22:15:53.764633632+02:00] Your kernel does not support cgroup rt period
WARN[2019-04-05T22:15:53.764738632+02:00] Your kernel does not support cgroup rt runtime
INFO[2019-04-05T22:15:53.767185285+02:00] Loading containers: start.
WARN[2019-04-05T22:15:53.780119485+02:00] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/4.19.26-0-rpi2 modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/4.19.26-0-rpi2, error: exit status 1
WARN[2019-04-05T22:15:53.791847911+02:00] Running modprobe nf_nat failed with message: `modprobe: WARNING: Module nf_nat not found in directory /lib/modules/4.19.26-0-rpi2`, error: exit status 1
WARN[2019-04-05T22:15:53.803231026+02:00] Running modprobe xt_conntrack failed with message: `modprobe: WARNING: Module xt_conntrack not found in directory /lib/modules/4.19.26-0-rpi2`, error: exit status 1
INFO[2019-04-05T22:15:54.104562927+02:00] stopping event stream following graceful shutdown  error="<nil>" module=libcontainerd namespace=moby
INFO[2019-04-05T22:15:54.124806827+02:00] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=plugins.moby
INFO[2019-04-05T22:15:54.125126981+02:00] stopping healthcheck following graceful shutdown  module=libcontainerd
INFO[2019-04-05T22:15:54.127279886+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4b461c0, TRANSIENT_FAILURE  module=grpc
INFO[2019-04-05T22:15:54.127564781+02:00] pickfirstBalancer: HandleSubConnStateChange: 0x4b461c0, CONNECTING  module=grpc Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.19.26-0-rpi2 iptables v1.6.2: 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)
你知道吗


谢谢。

我安装了aarch64而不是armv7,现在它可以工作了:

这是我的命令

  • 创建一个ext4分区来存储文件系统(sys模式)
  • 现在,清理第一个分区中的启动文件夹
  • 移动Alpine Linux的映像
  • 编辑
    /etc/fstab
    文件
  • cmdline.txt
    文件中更改根文件系统
你可能想要树莓皮的版本。 还可以尝试添加到/etc/apk/repositories

http://mirrors.sjtug.sjtu.edu.cn/alpine/v3.9/main
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community

还可以查看如何获取而不是进行传统的基于磁盘(sys)的安装。

我知道docker在我的pi上的安装过程有点不同。oO您是否遵循了在pi上安装docker的特定指南?例如,此指南在安装之前添加了一些库:哦,是的,我忘记添加此链接。我遵循这个文档。谢谢你的快速回答:)我会看看你的链接好的,我在阿尔卑斯Linux上,不是Raspbian。所以这有点不同:)您是否尝试过用正确的名称复制包:3
# uname -a
Linux srv-rp3 4.19.26-0-rpi2 #1-Alpine SMP Thu Feb 28 21:12:38 UTC 2019 armv7l Linux
apk add e2fsprogs
mkfs.ext4 /dev/mmcblk0p2
mount /dev/mmcblk0p2 /mnt
setup-disk -m sys /mnt
mount -o remount,rw /media/mmcblk0p1
rm -f /media/mmcblk0p1/boot/*
cd /mnt
rm boot/boot
mv boot/* /media/mmcblk0p1/boot/
rm -Rf boot
mkdir media/mmcblk0p1
ln -s media/mmcblk0p1/boot boot
echo "/dev/mmcblk0p1 /media/mmcblk0p1 vfat defaults 0 0" >> etc/fstab
sed -i '/cdrom/d' etc/fstab
sed -i '/floppy/d' etc/fstab
cd /media/mmcblk0p1
sed -i 's/^/root=\/dev\/mmcblk0p2 /' /media/mmcblk0p1/cmdline.txt  
reboot
http://mirrors.sjtug.sjtu.edu.cn/alpine/v3.9/main
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community