earthly / earthly

Super simple build framework with fast, repeatable builds and an instantly familiar syntax – like Dockerfile and Makefile had a baby.
https://earthly.dev
Mozilla Public License 2.0
11.32k stars 398 forks source link

Cannot run Terraform example due to earthly/dind image issue #1503

Open mirho opened 2 years ago

mirho commented 2 years ago

From Alex L. on the Earthly Community on Slack:

Hello folks - I am trying to run the terraform example from https://github.com/earthly/earthly/tree/main/examples/terraform but running localstack of earthly is failing with an error to use the earthly/dind image. So I changed the localstack directive to derive FROM earthly/dind:alpine but since I'm no longer deriving the +prep I don't have the terraform command. Is there a clean solution to this?

lamalex commented 2 years ago

I get the following output:

         +localstack | --> WITH DOCKER (install deps)
         +localstack | Docker Engine is missing. Attempting to install automatically.
         +localstack | fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
         +localstack | fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
         +localstack | (1/12) Installing libseccomp (2.5.2-r0)
         +localstack | (2/12) Installing runc (1.0.2-r1)
         +localstack | (3/12) Installing containerd (1.5.8-r0)
         +localstack | (4/12) Installing libmnl (1.0.4-r2)
         +localstack | (5/12) Installing libnftnl (1.2.1-r0)
         +localstack | (6/12) Installing iptables (1.8.7-r1)
         +localstack | (7/12) Installing ip6tables (1.8.7-r1)
         +localstack | (8/12) Installing tini-static (0.19.0-r0)
         +localstack | (9/12) Installing device-mapper-libs (2.02.187-r2)
         +localstack | (10/12) Installing docker-engine (20.10.11-r0)
         +localstack | (11/12) Installing docker-cli (20.10.11-r0)
         +localstack | (12/12) Installing docker (20.10.11-r0)
         +localstack | Executing docker-20.10.11-r0.pre-install
         +localstack | Executing busybox-1.34.1-r3.trigger
         +localstack | OK: 258 MiB in 43 packages
         +localstack | Docker Engine was missing. It has been installed automatically by Earthly.
         +localstack | Docker version 20.10.11, build 847da184ad5048b27f5bdf9d53d070f731b43180
         +localstack | For better use of cache, try using the official earthly/dind image for WITH DOCKER.
         +localstack | --> WITH DOCKER RUN --privileged docker run -d -p 4566:4566 --name localstack --network="host" localstack/localstack:0.13.1 && terraform apply -auto-approve
         +localstack | ERROR: dockerd crashed on startup
         +localstack | ==== Begin dockerd logs ====
         +localstack | time="2021-12-13T20:45:30.542890425Z" level=info msg="Starting up"
         +localstack | time="2021-12-13T20:45:30.561597883Z" level=info msg="libcontainerd: started new containerd process" pid=45
         +localstack | time="2021-12-13T20:45:30.564042258Z" level=info msg="parsed scheme: \"unix\"" module=grpc
         +localstack | time="2021-12-13T20:45:30.564171258Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
         +localstack | time="2021-12-13T20:45:30.565000467Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
         +localstack | time="2021-12-13T20:45:30.565313758Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
         +localstack | time="2021-12-13T20:45:30Z" level=warning msg="deprecated version : `1`, please switch to version `2`"
         +localstack | time="2021-12-13T20:45:30.808200175Z" level=info msg="starting containerd" revision=1e5ef943eb76627a6d3b6de8cd1ef6537f393a71 version=v1.5.8
         +localstack | time="2021-12-13T20:45:30.930109384Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1
         +localstack | time="2021-12-13T20:45:30.931057134Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.945848425Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: can't change directory to '/lib/modules': No such file or directory\\n\"): skip plugin" type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.946230509Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.947060717Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/earthly/dind/e1559f24dcc061754c7dc629e6c9ec7ba16f012a8065e560ff8213709b35ac76/containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.947143259Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.947366425Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
         +localstack | time="2021-12-13T20:45:30.947455300Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.947815050Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.949858050Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.zfs\"..." type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.950434800Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.zfs\"..." error="path /var/earthly/dind/e1559f24dcc061754c7dc629e6c9ec7ba16f012a8065e560ff8213709b35ac76/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
         +localstack | time="2021-12-13T20:45:30.950537425Z" level=info msg="loading plugin \"io.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1
         +localstack | time="2021-12-13T20:45:30.950926134Z" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
         +localstack | time="2021-12-13T20:45:30.951117050Z" level=info msg="metadata content store policy set" policy=shared
         +localstack | time="2021-12-13T20:45:30.961282884Z" level=info msg="loading plugin \"io.containerd.differ.v1.walking\"..." type=io.containerd.differ.v1
         +localstack | time="2021-12-13T20:45:30.961500634Z" level=info msg="loading plugin \"io.containerd.gc.v1.scheduler\"..." type=io.containerd.gc.v1
         +localstack | time="2021-12-13T20:45:30.962698925Z" level=info msg="loading plugin \"io.containerd.service.v1.introspection-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.963882467Z" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964016842Z" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964128175Z" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964266925Z" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964388800Z" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964512009Z" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964616092Z" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.964837800Z" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
         +localstack | time="2021-12-13T20:45:30.965290467Z" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
         +localstack | time="2021-12-13T20:45:30.966401467Z" level=info msg="loading plugin \"io.containerd.monitor.v1.cgroups\"..." type=io.containerd.monitor.v1
         +localstack | time="2021-12-13T20:45:30.968449175Z" level=info msg="loading plugin \"io.containerd.service.v1.tasks-service\"..." type=io.containerd.service.v1
         +localstack | time="2021-12-13T20:45:30.969158134Z" level=info msg="loading plugin \"io.containerd.internal.v1.restart\"..." type=io.containerd.internal.v1
         +localstack | time="2021-12-13T20:45:30.970576550Z" level=info msg="loading plugin \"io.containerd.grpc.v1.containers\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.970868800Z" level=info msg="loading plugin \"io.containerd.grpc.v1.content\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.971202634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.diff\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.971393717Z" level=info msg="loading plugin \"io.containerd.grpc.v1.events\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.971854634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.healthcheck\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.972048092Z" level=info msg="loading plugin \"io.containerd.grpc.v1.images\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.972365634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.leases\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.972592717Z" level=info msg="loading plugin \"io.containerd.grpc.v1.namespaces\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.972845675Z" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1
         +localstack | time="2021-12-13T20:45:30.974779384Z" level=info msg="loading plugin \"io.containerd.grpc.v1.snapshots\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.975003634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.975129884Z" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.975198092Z" level=info msg="loading plugin \"io.containerd.grpc.v1.introspection\"..." type=io.containerd.grpc.v1
         +localstack | time="2021-12-13T20:45:30.979067967Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock
         +localstack | time="2021-12-13T20:45:30.979279717Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
         +localstack | time="2021-12-13T20:45:30.979740842Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock
         +localstack | time="2021-12-13T20:45:30.984372175Z" level=info msg="containerd successfully booted in 0.189226s"
         +localstack | time="2021-12-13T20:45:31.048792467Z" level=info msg="parsed scheme: \"unix\"" module=grpc
         +localstack | time="2021-12-13T20:45:31.048898634Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
         +localstack | time="2021-12-13T20:45:31.048990217Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
         +localstack | time="2021-12-13T20:45:31.049059509Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
         +localstack | time="2021-12-13T20:45:31.054271259Z" level=info msg="parsed scheme: \"unix\"" module=grpc
         +localstack | time="2021-12-13T20:45:31.054355384Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
         +localstack | time="2021-12-13T20:45:31.054427425Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
         +localstack | time="2021-12-13T20:45:31.054495675Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
         +localstack | time="2021-12-13T20:45:31.106141634Z" level=info msg="Loading containers: start."
         +localstack | time="2021-12-13T20:45:31.122308384Z" level=warning msg="Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.7 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?)\nPerhaps iptables or your kernel needs to be upgraded.`, error: exit status 3"
         +localstack | time="2021-12-13T20:45:31.388740050Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
         +localstack | time="2021-12-13T20:45:31.389190217Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
         +localstack | time="2021-12-13T20:45:31.390425050Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
         +localstack | 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.8.7 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?)
         +localstack | Perhaps iptables or your kernel needs to be upgraded.
         +localstack |  (exit status 3)
         +localstack | ==== End dockerd logs ====
         +localstack | If you are having trouble running docker, try using the official earthly/dind image instead
         +localstack | ERROR: Command exited with non-zero code: WITH DOCKER RUN --privileged docker run -d -p 4566:4566 --name localstack --network="host" localstack/localstack:0.13.1 && terraform apply -auto-approve

============================ ❌ FAILURE [2. Build 🔧] ============================

Repeating the output of the command that caused the failure
         +localstack *failed* | --> WITH DOCKER RUN --privileged docker run -d -p 4566:4566 --name localstack --network="host" localstack/localstack:0.13.1 && terraform apply -auto-approve
         +localstack *failed* | ERROR: dockerd crashed on startup
         +localstack *failed* | ==== Begin dockerd logs ====
         +localstack *failed* | time="2021-12-13T20:45:30.542890425Z" level=info msg="Starting up"
         +localstack *failed* | time="2021-12-13T20:45:30.561597883Z" level=info msg="libcontainerd: started new containerd process" pid=45
         +localstack *failed* | time="2021-12-13T20:45:30.564042258Z" level=info msg="parsed scheme: \"unix\"" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:30.564171258Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:30.565000467Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:30.565313758Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:30Z" level=warning msg="deprecated version : `1`, please switch to version `2`"
         +localstack *failed* | time="2021-12-13T20:45:30.808200175Z" level=info msg="starting containerd" revision=1e5ef943eb76627a6d3b6de8cd1ef6537f393a71 version=v1.5.8
         +localstack *failed* | time="2021-12-13T20:45:30.930109384Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1
         +localstack *failed* | time="2021-12-13T20:45:30.931057134Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.945848425Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: can't change directory to '/lib/modules': No such file or directory\\n\"): skip plugin" type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.946230509Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.947060717Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/earthly/dind/e1559f24dcc061754c7dc629e6c9ec7ba16f012a8065e560ff8213709b35ac76/containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.947143259Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.947366425Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
         +localstack *failed* | time="2021-12-13T20:45:30.947455300Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.947815050Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.949858050Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.zfs\"..." type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.950434800Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.zfs\"..." error="path /var/earthly/dind/e1559f24dcc061754c7dc629e6c9ec7ba16f012a8065e560ff8213709b35ac76/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1
         +localstack *failed* | time="2021-12-13T20:45:30.950537425Z" level=info msg="loading plugin \"io.containerd.metadata.v1.bolt\"..." type=io.containerd.metadata.v1
         +localstack *failed* | time="2021-12-13T20:45:30.950926134Z" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
         +localstack *failed* | time="2021-12-13T20:45:30.951117050Z" level=info msg="metadata content store policy set" policy=shared
         +localstack *failed* | time="2021-12-13T20:45:30.961282884Z" level=info msg="loading plugin \"io.containerd.differ.v1.walking\"..." type=io.containerd.differ.v1
         +localstack *failed* | time="2021-12-13T20:45:30.961500634Z" level=info msg="loading plugin \"io.containerd.gc.v1.scheduler\"..." type=io.containerd.gc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.962698925Z" level=info msg="loading plugin \"io.containerd.service.v1.introspection-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.963882467Z" level=info msg="loading plugin \"io.containerd.service.v1.containers-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964016842Z" level=info msg="loading plugin \"io.containerd.service.v1.content-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964128175Z" level=info msg="loading plugin \"io.containerd.service.v1.diff-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964266925Z" level=info msg="loading plugin \"io.containerd.service.v1.images-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964388800Z" level=info msg="loading plugin \"io.containerd.service.v1.leases-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964512009Z" level=info msg="loading plugin \"io.containerd.service.v1.namespaces-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964616092Z" level=info msg="loading plugin \"io.containerd.service.v1.snapshots-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.964837800Z" level=info msg="loading plugin \"io.containerd.runtime.v1.linux\"..." type=io.containerd.runtime.v1
         +localstack *failed* | time="2021-12-13T20:45:30.965290467Z" level=info msg="loading plugin \"io.containerd.runtime.v2.task\"..." type=io.containerd.runtime.v2
         +localstack *failed* | time="2021-12-13T20:45:30.966401467Z" level=info msg="loading plugin \"io.containerd.monitor.v1.cgroups\"..." type=io.containerd.monitor.v1
         +localstack *failed* | time="2021-12-13T20:45:30.968449175Z" level=info msg="loading plugin \"io.containerd.service.v1.tasks-service\"..." type=io.containerd.service.v1
         +localstack *failed* | time="2021-12-13T20:45:30.969158134Z" level=info msg="loading plugin \"io.containerd.internal.v1.restart\"..." type=io.containerd.internal.v1
         +localstack *failed* | time="2021-12-13T20:45:30.970576550Z" level=info msg="loading plugin \"io.containerd.grpc.v1.containers\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.970868800Z" level=info msg="loading plugin \"io.containerd.grpc.v1.content\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.971202634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.diff\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.971393717Z" level=info msg="loading plugin \"io.containerd.grpc.v1.events\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.971854634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.healthcheck\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.972048092Z" level=info msg="loading plugin \"io.containerd.grpc.v1.images\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.972365634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.leases\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.972592717Z" level=info msg="loading plugin \"io.containerd.grpc.v1.namespaces\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.972845675Z" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1
         +localstack *failed* | time="2021-12-13T20:45:30.974779384Z" level=info msg="loading plugin \"io.containerd.grpc.v1.snapshots\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.975003634Z" level=info msg="loading plugin \"io.containerd.grpc.v1.tasks\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.975129884Z" level=info msg="loading plugin \"io.containerd.grpc.v1.version\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.975198092Z" level=info msg="loading plugin \"io.containerd.grpc.v1.introspection\"..." type=io.containerd.grpc.v1
         +localstack *failed* | time="2021-12-13T20:45:30.979067967Z" level=info msg=serving... address=/var/run/docker/containerd/containerd-debug.sock
         +localstack *failed* | time="2021-12-13T20:45:30.979279717Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock.ttrpc
         +localstack *failed* | time="2021-12-13T20:45:30.979740842Z" level=info msg=serving... address=/var/run/docker/containerd/containerd.sock
         +localstack *failed* | time="2021-12-13T20:45:30.984372175Z" level=info msg="containerd successfully booted in 0.189226s"
         +localstack *failed* | time="2021-12-13T20:45:31.048792467Z" level=info msg="parsed scheme: \"unix\"" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.048898634Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.048990217Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.049059509Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.054271259Z" level=info msg="parsed scheme: \"unix\"" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.054355384Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.054427425Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.054495675Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
         +localstack *failed* | time="2021-12-13T20:45:31.106141634Z" level=info msg="Loading containers: start."
         +localstack *failed* | time="2021-12-13T20:45:31.122308384Z" level=warning msg="Running iptables --wait -t nat -L -n failed with message: `iptables v1.8.7 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?)\nPerhaps iptables or your kernel needs to be upgraded.`, error: exit status 3"
         +localstack *failed* | time="2021-12-13T20:45:31.388740050Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
         +localstack *failed* | time="2021-12-13T20:45:31.389190217Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
         +localstack *failed* | time="2021-12-13T20:45:31.390425050Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
         +localstack *failed* | 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.8.7 (legacy): can't initialize iptables table `nat': iptables who? (do you need to insmod?)
         +localstack *failed* | Perhaps iptables or your kernel needs to be upgraded.
         +localstack *failed* |  (exit status 3)
         +localstack *failed* | ==== End dockerd logs ====
         +localstack *failed* | If you are having trouble running docker, try using the official earthly/dind image instead
         +localstack *failed* | ERROR: Command exited with non-zero code: WITH DOCKER RUN --privileged docker run -d -p 4566:4566 --name localstack --network="host" localstack/localstack:0.13.1 && terraform apply -auto-approve
Error: build target: build main: bkClient.Build: failed to solve: process "/bin/sh -c EARTHLY_DOCKERD_DATA_ROOT=\"/var/earthly/dind/e1559f24dcc061754c7dc629e6c9ec7ba16f012a8065e560ff8213709b35ac76\" EARTHLY_DOCKER_LOAD_FILES=\"/var/earthly/load-0/image.tar\" EARTHLY_START_COMPOSE=\"false\" EARTHLY_COMPOSE_FILES=\"\" EARTHLY_COMPOSE_SERVICES=\"\" AWS_ACCESS_KEY_ID=mock-id AWS_DEFAULT_REGION=us-east-1 AWS_SECRET_ACCESS_KEY=mock-key PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /var/earthly/dockerd-wrapper.sh execute /usr/bin/earth_debugger /bin/sh -c 'docker run -d -p 4566:4566 --name localstack --network=\"host\" localstack/localstack:0.13.1 && terraform apply -auto-approve'" did not complete successfully: exit code: 1
lamalex commented 2 years ago

I am on MacOS 12.0.1 with an M1 Pro

danielschlegel commented 1 year ago

fyi: i had the same failure on gitlab runner and could fix it with restarting docker and also prune earthly because the image build where failing for no reason after the docker restarts.

earthly prune --reset --all