PromptsVault AI is thinking...
Searching the best prompts from our community
Searching the best prompts from our community
Prompts matching the #containers tag
Optimize Docker images using multi-stage builds. Techniques: 1. Separate build and runtime stages. 2. Use slim base images (alpine, distroless). 3. Leverage layer caching with proper ordering. 4. Copy only necessary artifacts to final stage. 5. Use .dockerignore to exclude files. 6. Run as non-root user for security. 7. Scan for vulnerabilities with Trivy. Example for Node.js app: reduce image from 1GB to 150MB. Include CI integration and registry best practices.
Create production-ready Kubernetes manifests for a microservice. Resources: 1. Deployment with rolling update strategy and resource limits. 2. Service (ClusterIP) for internal communication. 3. Ingress with TLS termination. 4. ConfigMap for environment variables. 5. Secret for sensitive data. 6. HorizontalPodAutoscaler for auto-scaling. 7. PodDisruptionBudget for availability. Use namespaces, labels, and health checks (liveness/readiness probes). Include Helm chart structure for templating.
Deploy with Kubernetes. Concepts: 1. Pods as deployment units. 2. Deployments for replica management. 3. Services for networking. 4. ConfigMaps and Secrets for config. 5. Namespaces for isolation. 6. Ingress for HTTP routing. 7. Resource limits and requests. 8. Health and readiness probes. Use kubectl and YAML manifests. Implement rolling updates and rollbacks. Monitor with Prometheus.