diff --git a/Dockerfile b/Dockerfile index 18848aa..9d27f84 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,9 @@ FROM alpine:3.19 COPY scripts/docker-install-packages.sh /tmp/ RUN /tmp/docker-install-packages.sh -# Note: Alpine includes busybox by default +# Alpine Linux includes BusyBox by default +# BusyBox provides: shell (sh), networking (udhcpc, ip, ping, wget), and core utilities +# This is verified by the test.sh script which shows BusyBox version and available applets # Create minimal rootfs structure COPY scripts/docker-setup-rootfs.sh /tmp/ diff --git a/README.md b/README.md index 00d16b1..c2bee96 100644 --- a/README.md +++ b/README.md @@ -126,8 +126,15 @@ The Docker image includes: - Pre-built init system binary - Minimal root filesystem structure - Test environment for validation +- **BusyBox shell and utilities**: Alpine Linux base provides BusyBox (verified on startup) - **Multi-architecture support**: Available for both AMD64 (x86_64) and ARM64 (aarch64) architectures +When you run the Docker image, it automatically verifies: +- BusyBox version and installation +- Available BusyBox applets (sh, ls, cat, etc.) +- Required networking tools (udhcpc, ip, ping, wget) +- Custom init system binary + Images are automatically built and published to [GitHub Container Registry](https://github.com/johndoe6345789/SparkOS/pkgs/container/sparkos) on every push to main branch. **Building Releases with Docker (No Root Required):** diff --git a/scripts/test.sh b/scripts/test.sh index b35e580..42aeb56 100644 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -2,9 +2,47 @@ echo "SparkOS Docker Test Environment" echo "================================" echo "" -echo "SparkOS init binary: /sparkos/rootfs/sbin/init" + +# Verify BusyBox is present and working +echo "Verifying BusyBox..." +echo "-------------------" +if command -v busybox >/dev/null 2>&1; then + echo "✓ BusyBox is installed" + echo "" + echo "BusyBox version:" + busybox | head -n 1 + echo "" + echo "BusyBox location:" + which busybox + ls -lh $(which busybox) + echo "" + echo "Shell (/bin/sh) is BusyBox:" + ls -lh /bin/sh + if [ -L /bin/sh ]; then + echo " → /bin/sh is a symlink to: $(readlink /bin/sh)" + fi + echo "" + echo "Available BusyBox applets (sample):" + busybox --list | head -n 20 + echo " ... and $(busybox --list | wc -l) total applets" + echo "" + echo "Networking applets (required for SparkOS):" + for cmd in udhcpc ip ifconfig ping wget; do + if busybox --list | grep -q "^${cmd}$"; then + echo " ✓ $cmd" + else + echo " ✗ $cmd (NOT FOUND)" + fi + done +else + echo "✗ BusyBox not found!" + echo " SparkOS requires BusyBox for shell and utilities" + exit 1 +fi + echo "" -echo "Verifying init binary..." +echo "Verifying SparkOS init binary..." +echo "--------------------------------" if [ -f /sparkos/rootfs/sbin/init ]; then echo "✓ Init binary exists" ls -lh /sparkos/rootfs/sbin/init @@ -22,11 +60,21 @@ else echo "✗ Init binary not found!" exit 1 fi + echo "" echo "Root filesystem structure:" +echo "--------------------------" ls -la /sparkos/rootfs/ echo "" -echo "SparkOS is ready for testing!" +echo "================================" +echo "✓ SparkOS is ready for testing!" +echo "================================" +echo "" +echo "Summary:" +echo " - BusyBox: $(busybox | head -n 1)" +echo " - Init: Custom SparkOS init system" +echo " - Shell: BusyBox sh (/bin/sh)" +echo " - Networking: BusyBox udhcpc, ip, ping, wget" echo "" echo "To test the init system:" echo " docker run --rm /sparkos/rootfs/sbin/init --help" \ No newline at end of file