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
This commit is contained in:
@@ -72,9 +72,12 @@ services:
|
|||||||
dev-shell:
|
dev-shell:
|
||||||
extends: builder
|
extends: builder
|
||||||
container_name: zero-os-alpine-dev-shell
|
container_name: zero-os-alpine-dev-shell
|
||||||
command: /bin/sh
|
command: /bin/sh -l
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: 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:
|
volumes:
|
||||||
- ../configs:/build/configs
|
- ../configs:/build/configs
|
||||||
- ../scripts:/build/scripts
|
- ../scripts:/build/scripts
|
||||||
@@ -83,6 +86,7 @@ services:
|
|||||||
- build-cache:/build/cache
|
- build-cache:/build/cache
|
||||||
- source-cache:/build/source
|
- source-cache:/build/source
|
||||||
- kernel-cache:/build/kernel
|
- kernel-cache:/build/kernel
|
||||||
|
- target-cache:/build/target-cache
|
||||||
- ../configs/zinit:/mnt/zinit:ro
|
- ../configs/zinit:/mnt/zinit:ro
|
||||||
|
|
||||||
# Test build with minimal caching (for testing clean builds)
|
# Test build with minimal caching (for testing clean builds)
|
||||||
@@ -125,6 +129,7 @@ volumes:
|
|||||||
build-cache:
|
build-cache:
|
||||||
source-cache:
|
source-cache:
|
||||||
kernel-cache:
|
kernel-cache:
|
||||||
|
target-cache:
|
||||||
|
|
||||||
# Legacy volumes (for fallback)
|
# Legacy volumes (for fallback)
|
||||||
github-cache:
|
github-cache:
|
||||||
|
|||||||
Reference in New Issue
Block a user