mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-22 15:26:04 +02: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
|
# Fix for: FATAL: PROTECTION MODE IS ENABLED! error when protection mode is OFF
|
||||||
# Approach: Level 1 (standard bashio) + Level 2 (socket fallback)
|
# 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
|
# Step 1: Replace bashio v0.17.5 with main branch for improved API error handling
|
||||||
RUN rm -rf /usr/lib/bashio /usr/bin/bashio && \
|
RUN rm -rf /usr/lib/bashio /usr/bin/bashio && \
|
||||||
@@ -96,7 +98,7 @@ bashio::log.info "Starting Portainer Agent"
|
|||||||
# Launch app
|
# Launch app
|
||||||
cd /app || true
|
cd /app || true
|
||||||
if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then
|
if bashio::config.has_value 'PORTAINER_AGENT_ARGS'; then
|
||||||
./agent "$PORTAINER_AGENT_ARGS" 2> /dev/null
|
./agent "$PORTAINER_AGENT_ARGS"
|
||||||
else
|
else
|
||||||
./agent
|
./agent
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user