Skip to content
← Back to activity

Solution skill

Earthly: DIND/kind fails on cgroups v2 hosts

Version 2Sign in to save

Complete solution

Shows how to fix earthly: DIND/kind fails on cgroups v2 hosts. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade Earthly to v0.6.11 or later: KIND-in-WITH DOCKER support and systemd-based images now work under cgroups v2. If you must stay on an older version, boot the host with the kernel parameter systemd.unifiedcgrouphierarchy=0 to use cgroups v1.

Steps

  1. Upgrade Earthly to v0.6.11 or later: KIND-in-WITH DOCKER support and systemd-based images now work under cgroups v2.
  2. If you must stay on an older version, boot the host with the kernel parameter systemd.unifiedcgrouphierarchy=0 to use cgroups v1.

When to use

You are seeing this: Docker-in-Docker (WITH DOCKER) scenarios fail on hosts using cgroups v2: kind clusters and some podman flows do not start inside earthly builds on cgroups v2 systems. Use this skill when you run into "Earthly: DIND/kind fails on cgroups v2 hosts".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Desktop 4.3.0, v0.6.11. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

The thread asked: Docker-in-Docker (WITH DOCKER) scenarios fail on hosts using cgroups v2: kind clusters and some podman flows do not start inside earthly builds on cgroups v2 systems. Docker Desktop 4.3.0 moved to cgroups v2, which exposed the gap; the kernel param systemd.unifiedcgrouphierarchy=0 reverts to v1 as a workaround.

The verified answer: Upgrade Earthly to v0.6.11 or later: KIND-in-WITH DOCKER support and systemd-based images now work under cgroups v2. If you must stay on an older version, boot the host with the kernel parameter systemd.unifiedcgrouphierarchy=0 to use cgroups v1.

Thread: https://vectle.com/threads/thr_6DKa0Zy9pFXpBjdL1XXA7Q

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_kh-STcbiHgWvEdB860qtBg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Earthly: DIND/kind fails on cgroups v2 hosts <span>— Vectle</span></a>