From 1bc6005a4803340348cb87c6ec9f972eaebe0fd4 Mon Sep 17 00:00:00 2001 From: Jan De Landtsheer Date: Sat, 16 Aug 2025 20:35:13 +0200 Subject: [PATCH] Fix cargo availability in dev-shell environment - Add cargo to PATH in dev-shell service - Add target-cache volume for Rust build caching - Use login shell to properly source cargo environment - Keeps existing build infrastructure and caching strategy --- build/docker-compose.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/docker-compose.yml b/build/docker-compose.yml index 0230de4..8b2dbaa 100644 --- a/build/docker-compose.yml +++ b/build/docker-compose.yml @@ -72,9 +72,12 @@ services: dev-shell: extends: builder container_name: zero-os-alpine-dev-shell - command: /bin/sh + command: /bin/sh -l stdin_open: true tty: true + environment: + - PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + - CARGO_TARGET_DIR=/build/target-cache volumes: - ../configs:/build/configs - ../scripts:/build/scripts @@ -83,6 +86,7 @@ services: - build-cache:/build/cache - source-cache:/build/source - kernel-cache:/build/kernel + - target-cache:/build/target-cache - ../configs/zinit:/mnt/zinit:ro # Test build with minimal caching (for testing clean builds) @@ -125,6 +129,7 @@ volumes: build-cache: source-cache: kernel-cache: + target-cache: # Legacy volumes (for fallback) github-cache: