From 3a46549675c905bdf9d3080cad3ebec0fcc656e8 Mon Sep 17 00:00:00 2001 From: Jonathan Ogilvie Date: Tue, 13 Oct 2026 18:38:41 -0400 Subject: [PATCH] fix(nix): run dockerd from / so crashes can't leave core files in the checkout nix.sh started dockerd from the bind-mounted checkout, so dockerd and its children used it as their working directory. If one of them dumps core and the kernel's core_pattern is relative, the dump lands in the user's repo. On macOS with Rancher Desktop (Rosetta), BuildKit's emulator probe crashes at every dockerd start, leaving an empty `core` file in the repo root. Start dockerd from / instead. Its paths are all absolute, and nix still runs from the checkout. Co-Authored-By: Claude Opus 5.5 (1M context) Signed-off-by: Jonathan Ogilvie --- nix.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nix.sh b/nix.sh index 8e06f1b6..88bfdf58 100755 --- a/nix.sh +++ b/nix.sh @@ -25,8 +25,10 @@ if [ "${NIX_SH_CONTAINER:-}" = "1" ]; then # Start the Docker daemon, storing its data in the crossplane-cli-nix volume # for persistence across container runs. This gives us a consistent Docker - # environment with cached images (e.g., kind node images). - dockerd --data-root=/nix/docker >/tmp/dockerd.log 2>&1 & + # environment with cached images (e.g., kind node images). Run it from / so + # its children don't use the bind-mounted checkout as their working + # directory; a crashing child would otherwise leave a core file there. + (cd / && exec dockerd --data-root=/nix/docker >/tmp/dockerd.log 2>&1) & attempts=0 until docker info >/dev/null 2>&1; do