diff --git a/Dockerfile.nexus b/Dockerfile.nexus index 77308f1..b817761 100644 --- a/Dockerfile.nexus +++ b/Dockerfile.nexus @@ -38,6 +38,9 @@ COPY --from=builder /app/nexus /app/nexus # Copy webroot directory for web server assets COPY internal/web/webroot/ /app/webroot/ +# Copy minion binaries for download service +COPY binaries/ /app/binaries/ + # Create entrypoint script (use printf for proper newlines) RUN printf '#!/bin/sh\nexec /app/nexus\n' > /app/docker-entrypoint.sh && \ chmod +x /app/docker-entrypoint.sh diff --git a/internal/web/webroot/templates/install_minion.sh b/internal/web/webroot/templates/install_minion.sh index ea06e13..1b180b7 100644 --- a/internal/web/webroot/templates/install_minion.sh +++ b/internal/web/webroot/templates/install_minion.sh @@ -17,7 +17,9 @@ echo "Minion ID: $MINION_ID" # Download and install minion binary echo "Downloading minion binary..." -curl -o minion "http://$NEXUS_SERVER:{{.WebPort}}/binaries/minion/$(uname -s)-$(uname -m)" || { +OS=$(uname -s | tr '[:upper:]' '[:lower:]') +ARCH=$(uname -m) +curl -o minion "http://$NEXUS_SERVER:{{.WebPort}}/download/minion/${OS}-${ARCH}" || { echo "Failed to download minion binary" exit 1 } @@ -50,4 +52,4 @@ EOF else echo "Starting minion..." NEXUS_SERVER="$NEXUS_SERVER" NEXUS_MINION_PORT="$MINION_PORT" MINION_ID="$MINION_ID" ./minion -fi \ No newline at end of file +fi