docker-syntax-buildkit
Installation
SKILL.md
docker-syntax-buildkit
Quick Reference
Syntax Directive
ALWAYS include at the very top of every Dockerfile, before any other instruction:
# syntax=docker/dockerfile:1
This enables heredoc syntax, --mount flags, --chmod/--link/--parents/--exclude on COPY/ADD, the # check directive, and all other BuildKit extensions. ALWAYS use docker/dockerfile:1 (not 1.0 or a fixed minor version) to get the latest stable features.
Mount Types Overview
| Mount Type | Purpose | Key Use Case |
|---|---|---|
cache |
Persistent cache directories across builds | Package manager caches (apt, npm, pip, go) |
Related skills