docker-build
Installation
SKILL.md
Docker Build with Tracking
Build a Docker image with proper tagging and tracking: $ARGUMENTS
Process
-
Determine the image tag - Use git SHA or timestamp, NEVER use
:latestaloneGIT_SHA=$(git rev-parse --short HEAD) TIMESTAMP=$(date +%Y%m%d-%H%M%S) TAG="${GIT_SHA}-${TIMESTAMP}" -
Build with cache busting when needed
- For production builds:
docker build --no-cache --pull -t <registry>/<image>:${TAG} . - For dev builds:
docker build -t <registry>/<image>:${TAG} . - Always also tag as
:<branch>-latestfor convenience
- For production builds: