Skip to content

Leash fails to start on Docker Desktop: xt_cgroup module unavailable in LinuxKit #60

Closed

Description

@merphx

Kia ora team. Starting about a week ago, I noticed that when I run leash on my Mac with Docker Desktop, the leash container crashes shortly after startup with the following error in its logs:

leash: FATAL: could not apply cgroup-based control plane isolation
leash: This security control is required to prevent target container from accessing leashd API
{timestamp} exit status 1

The xt_cgroup kernel module isn't available in Docker Desktop's LinuxKit VM (6.12.68-linuxkit), causing the cgroup-based iptables rule to fail with "RULE_APPEND failed (Invalid argument)".

Workaround

I did some experimentation, and if I switch to the jay/secrets branch (commit b35fd2c), there appears to be a fix for the issue (changes the FATAL to a WARNING and uses loopback-only blocking as a fallback).

I rebuilt the containers on this branch, and the problem goes away—so it seems like this issue is already on the team's radar. Just wanted to flag it as it impacts the latest published Docker images in AWS.

Activity

  1. gaganpreet commented on Feb 22, 2026

    @gaganpreet

    I am getting the same error. Running Manjaro with Docker daemon (no Docker Desktop).

    iptables v1.8.9 (nf_tables):  RULE_APPEND failed (Invalid argument): rule in chain OUTPUT
    leash: FATAL: could not apply cgroup-based control plane isolation
    leash: This security control is required to prevent target container from accessing leashd API
    

    CC starts in leash but there's no network access.

  2. self-assigned this
    on Feb 26, 2026
  3. navanchauhan commented on Mar 4, 2026

    @navanchauhan
    Collaborator

    Investigating. I haven't been able to recreate it yet on my machine.

    ➜  leash git:(main) ✗ leash bash
    Pulling container image public.ecr.aws/s5i7k8t3/strongdm/coder:latest...
    latest: Pulling from s5i7k8t3/strongdm/coder
    46b1a8245d18: Pull complete
    0146b3618baa: Pull complete
    Digest: sha256:9b7fb4ec6edc49f06a03e84ff58fc55a5f882171766ef2474d757472108ffcf3
    Status: Downloaded newer image for public.ecr.aws/s5i7k8t3/strongdm/coder:latest
    public.ecr.aws/s5i7k8t3/strongdm/coder:latest
    Pulling container image public.ecr.aws/s5i7k8t3/strongdm/leash:latest...
    latest: Pulling from s5i7k8t3/strongdm/leash
    e9a0b2734536: Pull complete
    f18fdba6a0a1: Pull complete
    602bfed5a37e: Pull complete
    64e8f4c09e7a: Pull complete
    f85b194e7afa: Pull complete
    Digest: sha256:9736f1dd60992467abc5aaaabbe649556e0a7a886f30465115d26176a4f57500
    Status: Downloaded newer image for public.ecr.aws/s5i7k8t3/strongdm/leash:latest
    public.ecr.aws/s5i7k8t3/strongdm/leash:latest
    
    Leash UI (Control UI): http://localhost:18080/
    Target logs: docker logs -f leash
    Leash logs: docker logs -f leash-leash
    Stop everything with: docker rm -f leash leash-leash
    
    [leash] leash >
    exit
    Interactive session exited (code=0). Stopping containers...
    ➜  leash git:(main) ✗ docker version
    Client:
     Version:           28.5.2
     API version:       1.51
     Go version:        go1.25.3
     Git commit:        ecc6942
     Built:             Wed Nov  5 14:42:30 2025
     OS/Arch:           darwin/arm64
     Context:           desktop-linux
    
    Server: Docker Desktop 4.43.2 (199162)
     Engine:
      Version:          28.3.2
      API version:      1.51 (minimum version 1.24)
      Go version:       go1.24.5
      Git commit:       e77ff99
      Built:            Wed Jul  9 16:13:56 2025
      OS/Arch:          linux/arm64
      Experimental:     false
     containerd:
      Version:          1.7.27
      GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4da
     runc:
      Version:          1.2.5
      GitCommit:        v1.2.5-0-g59923ef
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    

    Edit: Reproduced the issue on the latest version of Docker Desktop

    ➜  leash git:(main) ✗ docker version
    Client:
     Version:           28.5.2
     API version:       1.51
     Go version:        go1.25.3
     Git commit:        ecc6942
     Built:             Wed Nov  5 14:42:30 2025
     OS/Arch:           darwin/arm64
     Context:           desktop-linux
    
    Server: Docker Desktop 4.63.0 (220185)
     Engine:
      Version:          29.2.1
      API version:      1.53 (minimum version 1.44)
      Go version:       go1.25.6
      Git commit:       6bc6209
      Built:            Mon Feb  2 17:16:47 2026
      OS/Arch:          linux/arm64
      Experimental:     false
     containerd:
      Version:          v2.2.1
      GitCommit:        dea7da592f5d1d2b7755e3a161be07f43fad8f75
     runc:
      Version:          1.3.4
      GitCommit:        v1.3.4-0-gd6d73eb8
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    
  4. navanchauhan commented on Mar 4, 2026

    @navanchauhan
    Collaborator

    Jay's fix in that commit is incomplete because no actual loopback-only blocking is implemented. The target has unrestricted access to the leashd API on port 18080.

    We will need to go back to the drawing board for this.

  5. added a commit that references this issue on Mar 4, 2026
    1ddc536
  6. added a commit that references this issue on Mar 8, 2026
    5bf1c64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions