Use when writing or changing a Dockerfile: builds small images with multi-stage builds, pins base image versions, orders layers so dependency installs are cached, runs as a non-root user, and keeps build tools and source out of the final image.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Docker Images?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/autonomous-ai-docker-images)
---
name: docker-images
description: "Use when writing or changing a Dockerfile: builds small images with multi-stage builds, pins base image versions, orders layers so dependency installs are cached, runs as a non-root user, and keeps build tools and source out of the final image."
---
Pin the base image by version. Copy the lockfile and install dependencies before copying source, so code edits do not bust the cache. Build in one stage and copy only the output into a slim runtime stage. Add a non-root user and a .dockerignore, and check the image size after each change.