mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-09 17:31:03 +01:00
fix: Address critical code review feedback from Gemini
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
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
# Fix for: FATAL: PROTECTION MODE IS ENABLED! error when protection mode is OFF
|
||||
# Approach: Level 1 (standard bashio) + Level 2 (socket fallback)
|
||||
|
||||
FROM ghcr.io/hassio-addons/base/amd64:11.1.0
|
||||
ARG BUILD_FROM
|
||||
ARG BUILD_ARCH
|
||||
FROM $BUILD_FROM
|
||||
|
||||
# Step 1: Replace bashio v0.17.5 with main branch for improved API error handling
|
||||
RUN rm -rf /usr/lib/bashio /usr/bin/bashio && \
|
||||
@@ -96,7 +98,7 @@ bashio::log.info "Starting Portainer Agent"
|
||||
# Launch app
|
||||
cd /app || true
|
||||
if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then
|
||||
./agent "$PORTAINER_AGENT_ARGS" 2> /dev/null
|
||||
./agent "$PORTAINER_AGENT_ARGS"
|
||||
else
|
||||
./agent
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user