agentleFS
TheBeardedBearSASTheBeardedBearSAS/claude-craft/.claude/skills/docker-hadolint/SKILL.md

docker-hadolint

Skill108 starsChanged 6 days agoMITView on GitHub

Docker & Hadolint validation (2026). Use when working with Docker, containers, or validating Dockerfiles.

The file

Files
SKILL.md

Docker & Hadolint (2026)

Versions (octobre 2026)

Validation Hadolint

TOUJOURS utiliser la version pinnée v2.15.1 (jamais latest ou sans tag).

# Validation Dockerfile
docker run --rm -i hadolint/hadolint:v2.15.1 < Dockerfile

# Validation via Makefile (recommandé)
make hadolint

Best Practices 2026

BuildKit Cache Mounts

RUN --mount=type=cache,target=/var/cache/apk \
    apk add --no-cache postgresql-dev

Bénéfice : Réduction temps build de 40-60%
Source : https://docs.docker.com/build/cache/

BuildKit Secrets

RUN --mount=type=secret,id=composer_token \
    COMPOSER_AUTH="$(cat /run/secrets/composer_token)" composer install

Bénéfice : Aucun secret dans l'image finale
Source : https://docs.docker.com/build/building/secrets/

Multi-Stage Builds

FROM php:8.4-fpm-alpine AS builder
RUN composer install

FROM php:8.4-fpm-alpine AS runtime
COPY --from=builder /app /app

Bénéfice : Réduction taille image de 60-97%
Source : https://docs.docker.com/build/building/multi-stage/

Images Distroless

FROM gcr.io/distroless/php8.4-fpm
COPY --from=builder /app /app

Bénéfice : Surface d'attaque minimale, CVE réduites de 90%
Source : https://github.com/GoogleContainerTools/distroless

Documentation Complète

Voir @.claude/references/symfony/docker.md pour architecture complète et exemples.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.