diff --git a/devbox.json b/devbox.json index 32c28913ef1..07ad979dd9c 100644 --- a/devbox.json +++ b/devbox.json @@ -57,8 +57,8 @@ "trap 'rm -f testscripts-linux-amd64 testscripts-linux-arm64' EXIT", "GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go test -c -o testscripts-linux-amd64", "GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go test -c -o testscripts-linux-arm64", - "image=$(docker build --quiet --tag devbox-ubuntu:noble --platform linux/amd64 .)", - "docker run --rm --platform linux/amd64 -e DEVBOX_RUN_FAILING_TESTS -e DEVBOX_RUN_PROJECT_TESTS -e DEVBOX_DEBUG $image \"$@\"", + "image=$(docker build --quiet --tag devbox-testscripts-ubuntu:noble --platform linux/amd64 .)", + "docker run --rm --mount type=volume,src=devbox-testscripts-amd64,dst=/nix --platform linux/amd64 -e DEVBOX_RUN_FAILING_TESTS -e DEVBOX_RUN_PROJECT_TESTS -e DEVBOX_DEBUG $image \"$@\"", ], }, }, diff --git a/testscripts/Dockerfile b/testscripts/Dockerfile index e0516602f48..bcb29bcaf77 100644 --- a/testscripts/Dockerfile +++ b/testscripts/Dockerfile @@ -19,13 +19,19 @@ FROM $BASEIMAGE:$BASETAG ARG TARGETOS ARG TARGETARCH +ENV XDG_CACHE_HOME=/nix/cache + COPY --from=installer --link /nix-installer-$TARGETOS-$TARGETARCH nix-installer RUN <