docker-build
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:
-
Verify the build
docker images | grep <image> docker inspect <registry>/<image>:${TAG} | jq '.[0].Created' -
Push to registry
docker push <registry>/<image>:${TAG} docker push <registry>/<image>:<branch>-latest -
Verify in registry
# For ACR: az acr repository show-tags --name <registry> --repository <image> --orderby time_desc --top 5 # For Docker Hub: docker manifest inspect <registry>/<image>:${TAG}
Anti-Patterns (DO NOT)
- Never build with just
:latesttag - Never skip pushing after building
- Never deploy without verifying the image exists in the registry
- Never use
imagePullPolicy: IfNotPresentwith mutable tags
More from lobbi-docs/claude
vision-multimodal
Vision and multimodal capabilities for Claude including image analysis, PDF processing, and document understanding. Activate for image input, base64 encoding, multiple images, and visual analysis.
242design-system
Apply and manage the AI-powered design system with 50+ curated styles
126complex-reasoning
Multi-step reasoning patterns and frameworks for systematic problem solving. Activate for Chain-of-Thought, Tree-of-Thought, hypothesis-driven debugging, and structured analytical approaches that leverage extended thinking.
105gcp
Google Cloud Platform services including GKE, Cloud Run, Cloud Storage, BigQuery, and Pub/Sub. Activate for GCP infrastructure, Google Cloud deployment, and GCP integration.
73kanban
Kanban methodology including boards, WIP limits, flow metrics, and continuous delivery. Activate for Kanban boards, workflow visualization, and lean project management.
62debugging
Debugging techniques for Python, JavaScript, and distributed systems. Activate for troubleshooting, error analysis, log investigation, and performance debugging. Includes extended thinking integration for complex debugging scenarios.
59