Skip to content

fix(docker): suppress DL3025 for HEALTHCHECK via inline pragma - #31

Merged
amartingarcia merged 1 commit into
mainfrom
fix/hadolint-dl3025-healthcheck
Oct 1, 2026
Merged

amartingarcia merged 1 commit into
mainfrom
fix/hadolint-dl3025-healthcheck

Conversation

@amartingarcia

@amartingarcia amartingarcia commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Problema

Mismo issue que devops-ia/powerpipe#28: hadolint 2.15.1 (empaquetado por hadolint-action v3.5.0, bump introducido en #30) detecta DL3025 en el CMD del HEALTHCHECK y deja de respetar la lista ignore: del .hadolint.yaml para este caso concreto.

El HEALTHCHECK usa forma shell intencionadamente (|| exit 1, no expresable en notación JSON/exec).

Solución

Pragma inline de hadolint, que sí se respeta independientemente del bug de parseo del config:

# hadolint ignore=DL3025
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
  CMD bash -c 'echo > /dev/tcp/localhost/9193' || exit 1

Verificado localmente con el binario de hadolint 2.15.1: exit 0.

Esto desbloquea #30, cuyo job Test falla en el paso Lint Dockerfile por este motivo.


Generated by Claude Code

Same issue as devops-ia/powerpipe#28: hadolint 2.15.1 (bundled by
hadolint-action v3.5.0, bumped in #30) stops honoring the top-level
.hadolint.yaml ignore list for DL3025 on HEALTHCHECK CMD specifically.
The HEALTHCHECK CMD uses shell form intentionally (needs the
|| exit 1 fallback, not expressible in JSON/exec form), so suppress
the rule inline instead of depending on the broken config-based ignore.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D8MDhpdCqZCczobh8qoQBK
@amartingarcia
amartingarcia merged commit 06d6788 into main Oct 1, 2026
7 checks passed
@amartingarcia
amartingarcia deleted the fix/hadolint-dl3025-healthcheck branch October 1, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants