Based on feedback from PR #2319 code review: critical network operations
need explicit error handling and validation.
Added safeguards:
- curl -f flag: Fail on HTTP errors (429, 404, 500, etc)
- test -s check: Verify downloaded file is not empty
- tar extraction error check: Fail if tar extraction fails
- lib directory validation: Confirm bashio/lib exists after extraction
- Explicit error messages: Clear diagnostics if any step fails
This prevents silent failures where downloads could fail but build
continues with broken/missing bashio installation.
Prevents: Users pulling images with non-functional bashio
Impact: Build will fail explicitly with clear error messages if download/extraction fails
- Multi-architecture support restored (aarch64 builds)
- Error suppression removed for user diagnostics
- Circular dependency fix documented
- Config.yaml version tag corrected
CRITICAL FIXES:
1. Restore multi-architecture support - Use ARG BUILD_FROM/BUILD_ARCH instead of hardcoded amd64 base image
- Fixes: aarch64 builds were broken by hardcoded FROM ghcr.io/hassio-addons/base/amd64:11.1.0
- Now: FROM $BUILD_FROM allows alexbelgium build system to set correct base per architecture
2. Remove stderr suppression from agent command - Restore error visibility for debugging
- Fixes: Error messages were hidden by 2>/dev/null redirection
- Now: ./agent command output visible for user diagnostics
These changes ensure:
- Multi-arch builds work correctly (amd64, aarch64, armv7, armhf, i386)
- Users can debug configuration issues via visible error logs
- Circular dependency fix is fully compatible with existing build system
Adds changelog entry for alpine-sts version (30-12-2025) documenting:
- Fix for circular dependency that prevented Docker builds
- Restoration of official Portainer Agent image source
- Resolution of Issue #2318 (404 manifest unknown errors for users)
Restores official Portainer Agent image source (ghcr.io/portainerci/agent:latest)
in COPY --from statements. Previous code review feedback inadvertently introduced
a circular dependency that prevents Docker builds.
This fixes Issue #2318 where users cannot update due to 404 manifest unknown error.
Closes#2318
- Use BUILD_FROM and BUILD_ARCH for multi-architecture support
* Replace hardcoded amd64 with BUILD_FROM in FROM statement
* Use BUILD_ARCH variable in COPY --from directives
* Enables building for both amd64 and aarch64 architectures
- Remove error suppression in run script for better debugging
* Change 'cd /app || true' to 'cd /app' (fail fast on errors)
* Remove '2> /dev/null' redirection from agent startup
* Allow error messages to reach container logs for troubleshooting
These changes ensure the fix works correctly across all supported architectures
and provides visibility into any runtime issues.
Fixes#2307
Changes:
- Update bashio from v0.17.5 → main branch (improved API error handling)
- Add robust protection mode check with Docker socket fallback
- Implement Level 1 (standard bashio) + Level 2 (socket check) fallback logic
- Update CHANGELOG.md with fix details
- Tested and verified working on Home Assistant OS with protection mode OFF
The fix addresses root cause: bashio v0.17.5 calls /addons/self endpoint
which returns 403 Forbidden. bashio's error handling incorrectly assumes
this means protection mode is ON. The fallback checks Docker socket directly
as a reliable indicator of actual protection mode state.