docker

Generate Docker Compose configurations for web app stacks with databases and Redis.

Updated Feb 21, 2024
One-click install
npx skills add https://github.com/zhongjis/nix-config --skill docker-zhongjis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker
Source: https://github.com/zhongjis/nix-config/tree/main/modules/home-manager/features/ai-tools/common/skills/general/docker
Command: npx skills add https://github.com/zhongjis/nix-config --skill docker-zhongjis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides patterns and best practices for using Docker and Docker Compose, simplifying local development, container security, and multi-service orchestration.

Core Features & Use Cases

  • Local Development Stacks: Define robust docker-compose.yml files for web applications, databases, and other services.
  • Dockerfile Optimization: Create efficient, secure, and multi-stage Dockerfiles for development and production.
  • Networking & Volumes: Configure container networking for service discovery and manage data persistence with various volume strategies.
  • Security Best Practices: Implement hardening techniques for Dockerfiles and Compose configurations to minimize attack surfaces.
  • Use Case: Quickly set up a standard web application stack including a Node.js app with hot-reloading, a PostgreSQL database, and Redis for caching, all managed by Docker Compose.

Quick Start

Use the docker skill to generate a standard docker-compose.yml file for a web application with a database and Redis.

Frequently Asked Questions about docker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Docker Compose file for local development with a database and Redis?

Docker Compose defines multi-service local development stacks by specifying web applications, PostgreSQL databases, and Redis caching in a single YAML configuration, enabling consistent orchestration and hot-reloading across all services.

What's the best way to optimize a Dockerfile for production deployments?

Optimizing a Dockerfile for production involves using multi-stage builds to minimize image size, applying security hardening techniques to reduce attack surfaces, and separating development dependencies from production runtime environments.

How does Docker container networking work for service discovery?

Docker container networking enables service discovery by allowing containers on the same custom network to resolve and communicate with each other by service name, simplifying multi-service orchestration without manual IP management.

When do I need specific Docker volume strategies for data persistence?

Docker volume strategies are needed when managing data persistence for stateful containers like databases, ensuring data survives container restarts and rebuilds by decoupling storage from the container filesystem lifecycle.

Does container security hardening require special Dockerfile configurations?

Container security hardening requires specific Dockerfile configurations to minimize attack surfaces, including running as non-root users, reducing installed packages, and applying least privilege principles to container execution.