docker
Docker containerization with Dockerfile, Compose, and multi-stage builds. Use for containers.
Works with
--- name: docker description: Docker containerization with Dockerfile, Compose, and multi-stage builds. Use for containers. license: MIT --- # Docker Docker standardizes software delivery by packaging apps into containers. In 2025, Docker emphasizes **BuildKit** for high-performance builds and **Docker Scout** for supply chain security. ## When to Use - **Local Development**: Replicate production environments locally (`docker compose`). - **CI/CD**: Standard unit of deployment for 99% of modern pipelines. - **Legacy Migration**: Wrap old apps in containers to extend their life. ## Quick Start (BuildKit) ```dockerfile # syntax=docker/dockerfile:1 FROM node:22-alpine AS base WORKDIR /app COPY package*.json ./ FROM base AS deps RUN npm ci FROM base AS release COPY --from=deps /app/node_modules ./node_modules COPY . . CMD ["node", "index.js"] ``` ## Core Concepts ### BuildKit The modern build engine (default in 2025). Features concurrent build steps, secret mounting, and cache exports. `DOCKER_BUILDKIT=1 docker build .` ### Multi-stage Builds Keep images tiny by separating "build" environment (compilers, SDKs) from "runtime" environment (minimal OS). ### Docker Compose Define multi-container apps. `docker compose up -d --watch` (New `watch` mode syncs files continuously). ## Best Practices (2025) **Do**: - **Use `docker init`**: Generates best-practice Dockerfiles and .dockerignore for your language. - **Use Distroless / Alpine**: Minimize attack surface. - **Scan with Docker Scout**: Check for CVEs early in the pipeline. **Don't**: - **Don't run as Root**: Use `USER node` or create a specific user in the Dockerfile. - **Don't leak secrets**: Use `--mount=type=secret` during build, never `COPY .env`. ## References - [Docker Documentation](https://docs.docker.com/)
More DevOps & Infrastructure skills
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
appinsights-instrumentation
microsoft/azure-skills
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
azure-storage
microsoft/azure-skills
Azure Storage Services including Blob Storage, File Shares, Queue Storage, Table Storage, and Data Lake. Answers questions about storage access tiers (hot, cool, cold, archive), when to use each tier, and tier comparison. Provides object storage, SMB file shares, async messaging, NoSQL key-value, and big data analytics. Includes lifecycle management. USE FOR: blob storage, file shares, queue storage, table storage, data lake, upload files, download blobs, storage accounts, access tiers, storage tiers, hot cool cold archive, storage tier comparison, when to use storage tiers, lifecycle management, Azure Storage concepts. DO NOT USE FOR: SQL databases, Cosmos DB (use azure-prepare), messaging with Event Hubs or Service Bus (use azure-messaging).

