Commit Graph

68 Commits

Author SHA1 Message Date
Alexandre
4434854232 Change ENTRYPOINT to use /usr/bin/env 2025-12-30 13:23:45 +01:00
Alexandre
9a86339d5f Change ENTRYPOINT to ha_entrypoint.sh 2025-12-30 12:59:10 +01:00
Alexandre
03eedf5a9d Refactor Dockerfile for Portainer Agent setup 2025-12-30 12:50:43 +01:00
Alexandre
7de70a2066 Update Dockerfile 2025-12-30 12:31:45 +01:00
Sophie
b35dd4f992 fix: Add robust error handling to bashio download process
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
2025-12-30 11:15:18 +01:00
Sophie
72a99d056a 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
2025-12-30 10:38:11 +01:00
Sophie
4a75b76a19 fix: Restore Portainer Agent build and image source - Fix circular dependency
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
2025-12-30 10:19:01 +01:00
Claude Code
f0f1251285 fix: Address code review feedback from Gemini
- 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.
2025-12-29 15:53:37 +01:00
Claude Code
6de904a01f fix: PROTECTION MODE IS ENABLED error when protection mode is OFF
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.
2025-12-29 15:40:14 +01:00
alexbelgium
e2e29a8a06 Updater bot : portainer_agent updated to alpine-sts 2025-12-24 08:34:58 +01:00
Alexandre
bb53062e94 Add bashio standalone to all 2025-08-02 11:13:15 +02:00
Alexandre
13884525a5 Add BUILD_VERSION env 2025-02-14 11:15:38 +01:00
Alexandre
807945c91c Fix log spamming 2025-01-06 10:16:16 +01:00
Alexandre
6562459bdc Add tzdata
https://github.com/alexbelgium/hassio-addons/issues/1303
2024-03-21 16:14:02 +01:00
Alexandre
d377698afa Lint 2024-03-19 14:12:47 +01:00
Alexandre
3c099ae4bd Ensure /bin/sh 2024-03-17 12:45:58 +01:00
Alexandre
80ab9db6b9 Lint 2024-03-17 09:56:21 +01:00
Alexandre
a29a371cbc Ensure /bin exists 2024-03-17 09:52:26 +01:00
Alexandre
45aa2ccebb Add tzdata
https://github.com/alexbelgium/hassio-addons/issues/1303
2024-03-14 22:15:21 +01:00
Alexandre
8c664cd4c0 Correct lint 2024-03-13 10:41:03 +01:00
Alexandre
d9c3ab0e71 Lint : DL3020 2024-03-12 14:10:40 +01:00
Alexandre
8e035dde96 Restore 2023-11-21 09:53:56 +01:00
Alexandre
39795634ba Correction 2023-09-10 07:53:37 +02:00
Alexandre
629efc0e93 External entrypoint modif 2023-09-10 07:28:02 +02:00
Alexandre
70ebdce084 Correct 2023-09-09 20:21:56 +02:00
Alexandre
c483228049 Avoid error if cont-env not defined 2023-09-09 20:04:45 +02:00
Alexandre
e8900fb0dc Correct typo 2023-09-09 19:35:53 +02:00
Alexandre
2c2502f575 ha_autoapps script 2023-09-09 19:24:52 +02:00
Alexandre
f79352608d External modules script 2023-09-09 19:17:08 +02:00
Alexandre
fdc05fcb8a Allow /sur/bin/bashio 2023-09-09 12:21:47 +02:00
Alexandre
de702a75e6 Lint 2023-09-09 12:10:43 +02:00
Alexandre
e5fef25659 Merge branch 'master' of https://github.com/alexbelgium/hassio-addons 2023-09-09 09:20:19 +02:00
Alexandre
c97e1007e1 Entrypoint modification 2023-09-09 09:20:16 +02:00
Alexandre
9cbfe5642c Allow other users 2023-09-08 22:42:42 +02:00
Alexandre
0f62e501fc Order 2023-09-05 23:24:01 +02:00
Alexandre
6a8e30e909 Clean logic 2023-09-05 21:27:22 +02:00
Alexandre
438f75a658 Hook entrypoint 2023-09-05 21:05:41 +02:00
Alexandre
e762b85847 ha_entrypoint 2023-09-05 18:23:50 +02:00
Alexandre
5504a88a11 Use template entrypoint 2023-09-05 17:43:56 +02:00
Alexandre
3cba6967d6 Clean logic 2023-09-05 15:41:11 +02:00
Alexandre
d7f2f29db1 Clean logic 2023-09-05 15:37:57 +02:00
Alexandre
a5a293716c Correct healthcheck https://github.com/alexbelgium/hassio-addons/issues/565 2023-05-21 18:38:21 +02:00
Alexandre
93e7879bc6 Update Dockerfile 2023-05-21 10:38:37 +02:00
Alexandre
738cba2977 Update Dockerfile 2023-05-21 10:36:03 +02:00
Alexandre
569366c1bd Update Dockerfile 2023-05-21 10:33:23 +02:00
Alexandre
ce2aabcb97 Update Dockerfile 2023-05-21 10:31:22 +02:00
Alexandre
92e5a66382 Update Dockerfile 2023-05-21 10:27:29 +02:00
Alexandre
f29de575fc Update Dockerfile 2023-05-21 10:23:19 +02:00
Alexandre
65337a89b8 Update Dockerfile 2023-05-21 10:20:47 +02:00
Alexandre
bfbc9500c2 Update Dockerfile 2023-05-21 10:16:34 +02:00