docker

Writes Dockerfiles, multi-stage builds, and Docker Compose configurations for containerized applications.

111|73|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/autopus-ai/autopus-adk --skill docker-autopus-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docker
Source: https://github.com/autopus-ai/autopus-adk/tree/main/.omp/skills/docker
Command: npx skills add https://github.com/autopus-ai/autopus-adk --skill docker-autopus-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing efficient and secure container configurations from scratch is error-prone: oversized images, missing non-root users, poor layer caching, and hardcoded secrets are common mistakes. This Skill provides proven Dockerfile and Docker Compose patterns so containers are built correctly the first time. ## Core Features & Use Cases - Multi-Stage Dockerfile Templates: Ready-to-use Go multi-stage builds that separate compilation from the runtime image, producing minimal final images. - Docker Compose Setups: Service definitions with health checks, dependency ordering (depends_on with conditions), volumes, and environment configuration for stacks like app + PostgreSQL. - Image Optimization & Security Guidance: Layer caching order, base image size comparison (scratch, alpine, distroless), .dockerignore templates, and security rules such as non-root execution and no build-arg secrets. - Use Case: When containerizing a Go API with a PostgreSQL database, use this Skill to generate a multi-stage Dockerfile, a Compose file with a healthy db dependency, and a .dockerignore, then verify against the included checklist. ## Quick Start Ask the agent to create a multi-stage Dockerfile and Docker Compose setup for your Go application with a PostgreSQL database using the docker skill.

Frequently Asked Questions about docker

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

FAQPage Schema
How do I write a multi-stage Dockerfile for a Go application?▼

Use a golang builder stage to compile a static binary with CGO_ENABLED=0, then copy only the binary into a minimal runtime image like alpine or scratch. This keeps build tools out of the final image and reduces size dramatically.

How do I set up Docker Compose with PostgreSQL and health checks?▼

Define a db service using postgres:16-alpine with a pg_isready healthcheck, then make the app service depend on it with condition: service_healthy. Store data in a named volume so it persists across container restarts.

Which Docker base image should I use for production?▼

Use scratch (~0MB) for static binaries, distroless (~2MB) for security-focused production, or alpine (~5MB) when you need CA certificates or a shell. Reserve the full golang image (~800MB) for build stages only.

Why is my Docker image build slow and how do I fix it?▼

Slow builds usually come from poor layer caching. Copy go.mod and go.sum first and run go mod download before copying source code, so dependency layers are cached and only rebuild when dependencies change.

Is it safe to pass secrets as Docker build arguments?▼

No. Values passed via ARG are embedded in image layers and can be inspected by anyone with the image. Inject secrets at runtime through environment variables or a secrets manager instead.