fix(peer-cli): use writable Docker config for image builds

The peer CLI Docker recipes failed on this host because Docker Buildx tried to
write activity metadata under /home/pfs/.docker, which is read-only here. Use a
repo-local ignored Docker config by default, while still respecting an explicit
DOCKER_CONFIG from the caller.

This keeps the peer-cli image and network recipes runnable without requiring
host-global Docker client state to be writable.

Test Plan:
- just peer-cli-image

Refs: PEER_CLI_SCENARIOS.md
This commit is contained in:
2026-05-17 09:33:48 +02:00
parent 9a677947ed
commit 31e1a7eb3b
+3
View File
@@ -1,5 +1,6 @@
export RUSTFLAGS := "-C target-cpu=native"
export WEBKIT_DISABLE_COMPOSITING_MODE := "1"
export DOCKER_CONFIG := env_var_or_default("DOCKER_CONFIG", ".lanspread-peer-cli/docker-config")
build:
cargo tauri build --no-bundle -- --profile dev
@@ -29,6 +30,7 @@ peer-cli-build:
cargo build -p lanspread-peer-cli
peer-cli-image:
mkdir -p "$DOCKER_CONFIG"
docker build -f crates/lanspread-peer-cli/Dockerfile -t lanspread-peer-cli:dev .
# macvlan: each peer container gets its own MAC/IP on the real LAN.
@@ -40,6 +42,7 @@ LANSPREAD_SUBNET := "192.168.1.0/24"
LANSPREAD_GATEWAY := "192.168.1.1"
peer-cli-net:
mkdir -p "$DOCKER_CONFIG"
docker network inspect {{LANSPREAD_NET}} >/dev/null 2>&1 || \
docker network create -d macvlan \
--subnet={{LANSPREAD_SUBNET}} \