Skip to content
Back to skills

Docker Hadolint

BSecurity

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

  • 105 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
devopsgophpbashsqldockergitdocumentation

Security analysis

B88/100
  • criticalSends environment variables or credentials to an external URL

Pro shows the line behind each finding and how to fix it

Scanned September 5, 2026

npx -y skills add TheBeardedBearSAS/claude-craft --skill docker-hadolint --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docker Hadolint?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docker Hadolint
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/thebeardedbearsas-docker-hadolint/badge)](https://www.skillsdirectory.com/skills/thebeardedbearsas-docker-hadolint)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: docker-hadolint
description: Docker & Hadolint validation (2026). Use when working with Docker, containers, or validating Dockerfiles.
context: fork
---

# Docker & Hadolint (2026)

## Versions (avril 2026)

- **Docker Engine** : 29.5.2 (patch sécurité, juin 2026)  
  Source : https://docs.docker.com/engine/release-notes/29/
- **Docker Compose** : Spec v5.0.0 "Mont Blanc" (champ `version:` obsolète depuis v2.40+)  
  Source : https://www.compose-spec.io/
- **Hadolint** : v2.12.0 (version stable pinnée)  
  Source : https://github.com/hadolint/hadolint/releases/tag/v2.12.0

## Validation Hadolint

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

```bash
# Validation Dockerfile
docker run --rm -i hadolint/hadolint:v2.12.0 < Dockerfile

# Validation via Makefile (recommandé)
make hadolint
```

## Best Practices 2026

### BuildKit Cache Mounts
```dockerfile
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
```dockerfile
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
```dockerfile
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
```dockerfile
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…