From 0ee304463c9521cb18b015d3f58ef6f4ed6ca37f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 28 Dec 2025 17:17:05 +0000 Subject: [PATCH] Fix missing 'file' command error in Docker test script Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index abc6629..25ab110 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,10 @@ RUN make init # Runtime stage - use Alpine for minimal size FROM alpine:3.19 +# Install file command for testing init binary +# file package provides the file(1) command to determine file type +RUN apk add --no-cache file || true + # Note: Alpine includes busybox by default # Create minimal rootfs structure @@ -65,7 +69,11 @@ if [ -f /sparkos/rootfs/sbin/init ]; then ls -lh /sparkos/rootfs/sbin/init echo "" echo "File type:" - file /sparkos/rootfs/sbin/init + if command -v file >/dev/null 2>&1; then + file /sparkos/rootfs/sbin/init + else + echo " (file command not available)" + fi echo "" echo "Dependencies:" ldd /sparkos/rootfs/sbin/init 2>&1 || echo " Static binary (no dependencies)"