Skip to content
Kitbay

docker-build-strategies

Apache-2.0Updated on Nov 10, 2026625GitHub starsIncludes scripts

An agent skill from Docker focused on the quality of Dockerfiles and the images they produce.

What the skill teaches

An agent skill from Docker focused on the quality of Dockerfiles and the images they produce. It gives the agent rules for multi-stage builds with named stages and small runtime bases, ordering instructions so layer caching works, keeping the build context lean with .dockerignore, running containers as a non-root user and trimming image size, with reference notes per language and example Dockerfiles for Go, Node.js and Python. A bundled shell script builds the current project and reports the image size and configured user. BuildKit is expected, which is the default from Docker 23.0.

Capabilities

  • Write or review Dockerfiles with multi-stage builds
  • Order layers for better build caching
  • Create a .dockerignore file
  • Build an image and report its size and user