Zum Inhalt springen
Kitbay

docker-build-strategies

Apache-2.0Aktualisiert am 10. Nov. 2026625GitHub-SterneEnthält Skripte

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

Was der Skill vermittelt

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.

Funktionen

  • 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