[{"data":1,"prerenderedAt":54},["ShallowReactive",2],{"tool-guide:infrastructure-template":3},{"overview":4,"whatIs":5,"useCases":6,"steps":12,"commonMistakes":18,"relatedStandards":24,"example":34,"limitations":38,"faq":41},"Docker & Kubernetes Templates creates deterministic Dockerfile, Compose, and Kubernetes starting points from a small reviewed set of runtime options.","Containerization with Docker and orchestration with Kubernetes are the standard deployment model for modern applications. Writing a Dockerfile from scratch requires knowing the right base image, multi-stage build patterns, non-root user setup, and layer caching strategies. Kubernetes manifests add Deployment specifications, Service networking, resource limits, health probes, and ConfigMap references. This tool generates production-hardened starting points for seven runtimes (Node, Python, Go, Java, Rust, .NET, Ruby), using Alpine-based images for minimal attack surface, non-root users by default, and multi-stage builds to keep final images small. For Kubernetes, it generates Deployments with configurable replicas, resource requests and limits, and corresponding Services. These templates save 15-30 minutes of boilerplate per project and encode best practices that are easy to forget: using COPY instead of ADD, pinning image tags, setting WORKDIR, and configuring proper signal handling.",[7,8,9,10,11],"New project scaffolding — generate a Dockerfile and docker-compose.yml to containerize a new application in minutes instead of writing from scratch.","Kubernetes deployment — generate Deployment and Service manifests with proper resource limits, health probes, and replica configuration.","Learning container best practices — review the generated templates to understand multi-stage builds, non-root users, and layer caching.","CI\u002FCD pipeline setup — generate container configuration for build pipelines that need to build and push Docker images.","Microservice deployment — generate consistent container configurations across multiple services with different runtimes.",[13,14,15,16,17],"Choose the template type: Dockerfile, Docker Compose, or Kubernetes manifest.","Select the runtime: Node, Python, Go, Java, Rust, .NET, or Ruby.","Set the exposed port and relevant deployment options (replicas, resource limits).","Generate the template, review it, and adapt it to your application's specific requirements.","Pin image tags, add health probes, and configure secrets before deploying to production.",[19,20,21,22,23],"Using latest tag in production — always pin a specific image version (e.g., node:22.6-alpine) to ensure reproducible builds and avoid surprise breaking changes.","Running as root — containers should run as a non-root user for security. The generated templates include USER directives, but verify that your application does not require root privileges.","Missing .dockerignore — without it, node_modules, .git, and other large directories are copied into the build context, slowing builds and inflating images.","No health probes in Kubernetes — without liveness and readiness probes, Kubernetes cannot detect unhealthy pods. Add probes that match your application's health endpoint.","Ignoring resource limits — Kubernetes pods without resource limits can consume all node resources. Set CPU and memory requests and limits for predictable scheduling.",[25,28,31],{"title":26,"url":27},"Dockerfile reference","https:\u002F\u002Fdocs.docker.com\u002Freference\u002Fdockerfile\u002F",{"title":29,"url":30},"Docker Compose specification","https:\u002F\u002Fdocs.docker.com\u002Fcompose\u002Fcompose-file\u002F",{"title":32,"url":33},"Kubernetes Deployment documentation","https:\u002F\u002Fkubernetes.io\u002Fdocs\u002Fconcepts\u002Fworkloads\u002Fcontrollers\u002Fdeployment\u002F",{"label":35,"input":36,"output":37},"Start a Node container file","Dockerfile · Node · port 3000","FROM node:22-alpine\nWORKDIR \u002Fapp\nEXPOSE 3000",[39,40],"Templates are starting points, not a security or production-readiness certification.","Pin images, commands, resources, probes, and secret handling for the real deployment.",[42,45,48,51],{"question":43,"answer":44},"Which container runtimes are supported?","Dockerfile templates cover Node, Python, Go, Java, Rust, .NET, and Ruby with Alpine-based images and non-root users by default.",{"question":46,"answer":47},"Are the generated templates production-ready?","They are hardened starting points with non-root users and minimal base images. You should still review image pinning, resource limits, probes, and secrets for your environment.",{"question":49,"answer":50},"Can I generate Kubernetes manifests?","Yes. Choose the Kubernetes template type to generate a Deployment, Service, and optional ConfigMap or Ingress resource.",{"question":52,"answer":53},"Why are Alpine-based images used?","Alpine images are 5-10x smaller than Debian-based images, reducing download time, attack surface, and CVE exposure. If your application needs glibc, switch to a slim Debian variant.",1788868141033]