Use this skill to write, review or shrink a container image: a Containerfile or Dockerfile, a multi-stage build, a base-image choice, layer caching, image size, tags and digests, or "how should I containerize this app". Triggers include "write a Dockerfile", "containerize", "image too big", "slow docker build", "which base image", "multi-stage", "สร้าง image". Works from references/best-practices.md and a reference Containerfile per stack; lint with hadolint and audit with the security-audit ...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Images?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/th3r-dev-images)
---
name: containers-images
description: Use this skill to write, review or shrink a container image: a Containerfile or Dockerfile, a multi-stage build, a base-image choice, layer caching, image size, tags and digests, or "how should I containerize this app". Triggers include "write a Dockerfile", "containerize", "image too big", "slow docker build", "which base image", "multi-stage", "สร้าง image". Works from references/best-practices.md and a reference Containerfile per stack; lint with hadolint and audit with the security-audit sub-skill before calling it done.
---
# Containers: images
Read [`references/best-practices.md`](references/best-practices.md) before writing or reviewing a build file.
## Workflow
1. **Read the app**: language, how it builds, what it runs, which port, what it writes to disk.
2. **Start from the matching reference** in [`references/reference-images.md`](references/reference-images.md); change only what the app needs.
3. **Build** with `podman build -t <name>:dev .` and run it once (`podman run --rm -p <port>:<port> <name>:dev`).
4. **Check**: `hadolint Containerfile`, `uv run --no-project python ../security-audit/scripts/audit.py Containerfile`, and `dive <name>:dev` when size matters. Report the image size before and after.
## Done means
- Pinned base (tag + digest), multi-stage when there is a build step, non-root `USER`, a `.containerignore` / `.dockerignore`.
- `audit.py` exits 0 and hadolint has no errors.
- The image runs and answers on its port.