Docker Container Expert logo

Docker Container Expert

Community
roedyrustam
docker-container-expert

Production Docker containerization, BuildKit, distroless, and Compose / Kontainerisasi Docker produksi, BuildKit, distroless, dan Compose.

Overview

Publisherroedyrustam
Repositoryvibes-plug
Skill namedocker-container-expert
Stars
117
Forks
27
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by roedyrustam on GitHub. Read the source before you install it.

Installation

Install the Docker Container Expert AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/roedyrustam/vibes-plug/tree/main/skills/docker-container-expert
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/roedyrustam/vibes-plug.git /tmp/vibes-plug
mkdir -p .claude/skills
cp -r /tmp/vibes-plug/skills/docker-container-expert .claude/skills/docker-container-expert
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Docker Container Expert in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Docker Container Expert on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Docker Container Expert is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Docker Container Expert (Production Standard 2026)

English | Bahasa Indonesia


English

Orchestration & Integration

  • Upstream & Lifecycle: zero-to-prod-orchestrator (Phase 7 containerization), brainstorming, session-memory-manager.
  • CI/CD & Cloud Runtime: ci-cd-devops-architect (K8s & deployment pipelines), github-actions-expert (BuildKit actions & registry push), cloud-hosting-expert (container runtime hosts).
  • Backend & Database Runtimes: js-backend-expert (Node/Bun/Deno), python-programming-expert, go-programming-expert, rust-programming-expert, database-orm-expert (Postgres/Redis services).
  • Security & Hardening: production-ready-hardener (distroless & nonroot audit), zero-trust-secret-vault (build secret mounts).

Description

Enterprise guide for building ultra-lean, hardened, and reproducible container images and orchestrating local and production workloads with Docker Engine 27+ and Docker Compose v2. Covers BuildKit cache mounts (--mount=type=cache), secret mounts (--mount=type=secret), multi-stage builds targeting Google Distroless or Alpine Linux, non-root execution (UID 65532), dropping Linux kernel capabilities (cap_drop: ALL), health checks (HEALTHCHECK), internal isolated bridge networks, compose dependency sequencing (condition: service_healthy), and multi-architecture builds via docker buildx.

Trigger Conditions

  • Writing, refactoring, or optimizing Dockerfile manifests for Node.js, Python, Go, Rust, or Bun.
  • Structuring multi-container local and staging topologies with compose.yaml.
  • Accelerating build speeds using Docker BuildKit cache mounts and layer ordering.
  • Minimizing image attack surface: eliminating shell binaries, package managers, and root permissions.
  • Hardening container security: dropping Linux capabilities, setting read-only filesystems, and enforcing memory/CPU limits.
  • Configuring robust health checks and zero-downtime container lifecycle management.

What's New in 2026 (Modern Containerization Standards)

1. BuildKit as the De Facto Engine
  • Always specify # syntax=docker/dockerfile:1.7 at the top of the Dockerfile.
  • Use --mount=type=cache for package manager caches (/root/.local/share/pnpm/store, /root/.cache/pip, /var/cache/apt).
  • Use --mount=type=secret,id=npmrc to inject credentials without leaving traces in image layers.
2. Rootless & Distroless Execution
  • Never run containers as root (UID 0). Use Google Distroless nonroot (UID 65532) or explicitly created system users with no shell (/sbin/nologin).
  • Discard build tools (gcc, npm, cargo) completely in intermediate build stages.
3. Compose Specification Standard
  • Standard filename is compose.yaml (preferred over deprecated docker-compose.yml).
  • Explicit health checks with dependency conditions (depends_on: service: condition: service_healthy).
  • Strict resource reservations and limits (CPU and memory envelopes).

Core Architecture Patterns

Pattern 1: Production Multi-Stage Distroless Node.js Dockerfile (Dockerfile)
dockerfile
# syntax=docker/dockerfile:1.7
# Stage 1: Dependency resolution and compilation
FROM node:22-alpine AS builder
WORKDIR /app

# Enable pnpm deterministically via corepack
RUN corepack enable && corepack prepare pnpm@9.15.4 --activate

# Layer caching: copy package manifests first
COPY package.json pnpm-lock.yaml ./

# Install dependencies using persistent BuildKit cache mount
RUN --mount=type=cache,id=pnpm,target=/root/.local/share/pnpm/store \
    pnpm install --frozen-lockfile

# Copy application source code
COPY . .

# Build production bundle and prune development dependencies
RUN pnpm run build && pnpm prune --prod

# Stage 2: Minimal hardened production runner (Zero Shell, Zero Package Manager)
FROM gcr.io/distroless/nodejs22-debian12:nonroot AS runner
WORKDIR /app

# Run strictly as unprivileged user (UID 65532)
USER nonroot

# Copy build artifacts and production dependencies with nonroot ownership
COPY --from=builder --chown=nonroot:nonroot /app/node_modules ./node_modules
COPY --from=builder --chown=nonroot:nonroot /app/dist ./dist
COPY --from=builder --chown=nonroot:nonroot /app/package.json ./package.json

ENV NODE_ENV=production
ENV PORT=3000

EXPOSE 3000

# Execute Node.js directly (no shell wrapper)
CMD ["dist/index.js"]

Pattern 2: Ultra-Minimal Static Go/Rust Binary Container (Dockerfile.go)
dockerfile
# syntax=docker/dockerfile:1.7
# Stage 1: Compile static binary
FROM golang:1.24-alpine AS builder
WORKDIR /src

RUN apk add --no-cache ca-certificates tzdata

COPY go.mod go.sum ./
RUN --mount=type=cache,target=/go/pkg/mod \
    go mod download

COPY . .

# Compile static binary without CGO dependency
RUN --mount=type=cache,target=/go/pkg/mod \
    --mount=type=cache,target=/root/.cache/go-build \
    CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
    go build -ldflags="-w -s" -o /bin/server ./cmd/server

# Stage 2: Scratch container (Zero attack surface, < 15MB total size)
FROM scratch
WORKDIR /app

# Import SSL root certificates and timezone data from builder
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /bin/server /app/server

# Run as non-root user ID
USER 65532:65532

EXPOSE 8080

ENTRYPOINT ["/app/server"]

Pattern 3: Production-Grade Multi-Service compose.yaml
yaml
services:
  database:
    image: postgres:17-alpine
    container_name: production_db
    restart: unless-stopped
    environment:
      POSTGRES_DB: app_production
      POSTGRES_USER: app_admin
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password
    secrets:
      - db_password
    volumes:
      - pgdata:/var/lib/postgresql/data
    networks:
      - internal_backend
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U app_admin -d app_production"]
      interval: 5s
      timeout: 5s
      retries: 5
      start_period: 10s
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 2048M
        reservations:
          cpus: '0.5'
          memory: 512M

  cache:
    image: redis:7-alpine
    container_name: production_cache
    restart: unless-stopped
    command: ["redis-server", "--appendonly", "yes", "--requirepass", "cache_secure_token"]
    volumes:
      - redisdata:/data
    networks:
      - internal_backend
    healthcheck:
      test: ["CMD", "redis-cli", "-a", "cache_secure_token", "ping"]
      interval: 5s
      timeout: 3s
      retries: 3
    deploy:
      resources:
        limits:
          cpus: '1.0'
          memory: 512M

  api:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: production_api
    restart: unless-stopped
    environment:
      NODE_ENV: production
      PORT: 3000
      DATABASE_URL: postgresql://app_admin:secret@database:5432/app_production
      REDIS_URL: redis://:cache_secure_token@cache:6379
    ports:
      - "3000:3000"
    networks:
      - internal_backend
      - public_ingress
    depends_on:
      database:
        condition: service_healthy
      cache:
        condition: service_healthy
    deploy:
      resources:
        limits:
          cpus: '1.5'
          memory: 1024M

networks:
  internal_backend:
    internal: true
  public_ingress:
    driver: bridge

volumes:
  pgdata:
  redisdata:

secrets:
  db_password:
    file: ./secrets/db_password.txt

Sovereign Execution, Token Efficiency & Invariants

DimensionSovereign Mandate & Deterministic Contract
Frontier Model CascadeMedium / High (GPT-5.6 Sol Medium, Gemini 4 Argon, Claude Sonnet 5.5 High, Grok 4.7 High Fast)
Availability FallbackGemini 4 Argon/Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6 (Zero unhandled missing-model errors)
KV-Cache & Token ProtocolPin static instructions & schemas at prompt prefix (kv-cache-prefix-optimizer); pass surgical CONTEXT_MAP.md slices (<250 tokens/call) during Swarm Fan-Out
SaaT CLI & MCP DispatchCLI: vibes skill exec docker-container-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_ast_query, vibes_compile_cache, vibes_optimize_budget, vibes_verify_gate
NFR & Anti-Slop InvariantsP99 API Gateway Latency < 85ms, OpenAPI 3.1 / TypeSpec strict schema parity, RFC 9457 Problem Details error contracts, Idempotency-Key enforcement; 100% complete zero-placeholder output verified via node scripts/check-anti-slop.js --strict


Bahasa Indonesia

Integrasi Orkestrasi

  • Hulu & Siklus Hidup: zero-to-prod-orchestrator (Kontainerisasi Fase 7), brainstorming, session-memory-manager.
  • CI/CD & Runtime Cloud: ci-cd-devops-architect (pipeline K8s & deployment), github-actions-expert (aksi BuildKit & push registry), cloud-hosting-expert (host runtime kontainer).
  • Runtime Backend & Database: js-backend-expert (Node/Bun/Deno), python-programming-expert, go-programming-expert, rust-programming-expert, database-orm-expert (layanan Postgres/Redis).
  • Keamanan & Pengerasan: production-ready-hardener (audit distroless & nonroot), zero-trust-secret-vault (secret mount saat build).

Deskripsi

Panduan standar industri enterprise untuk membangun image kontainer yang ramping, aman, dan dapat direproduksi serta mengorkestrasi lingkungan lokal dan produksi menggunakan Docker Engine 27+ dan Docker Compose v2. Meliputi cache mount BuildKit (--mount=type=cache), secret mount (--mount=type=secret), multi-stage build berbasis Google Distroless atau Alpine Linux, eksekusi non-root (UID 65532), pelepasan kapabilitas Linux kernel (cap_drop: ALL), health check (HEALTHCHECK), isolasi jaringan internal (isolated bridge network), sequencing dependensi compose (condition: service_healthy), dan build multi-arsitektur menggunakan docker buildx.

Kondisi Pemicu (Trigger Conditions)

  • Menulis, merefaktor, atau mengoptimalkan Dockerfile untuk Node.js, Python, Go, Rust, atau Bun.
  • Menyusun topologi multi-kontainer untuk lingkungan lokal atau staging menggunakan compose.yaml.
  • Mempercepat build image dengan memanfaatkan BuildKit cache mount dan pengurutan layer yang optimal.
  • Memperkecil permukaan serangan (attack surface) image: menghapus shell bash/sh, package manager, dan akses root.
  • Memperketat keamanan kontainer: mencabut kemampuan Linux berlebih, filesystem read-only, dan limitasi resource CPU/RAM.
  • Menyiapkan health check yang andal untuk manajemen siklus hidup kontainer tanpa downtime.

Aturan Emas Kontainerisasi Modern 2026

  1. Dilarang Menjalankan Kontainer Sebagai Root: Selalu gunakan user tanpa hak istimewa seperti nonroot (UID 65532 pada Google Distroless) untuk mencegah potensi container breakout ke host system.
  2. Multi-Stage Build Bersih: Pisahkan lingkungan kompilasi/build (yang memerlukan compiler dan devDependencies) dari lingkungan runtime produksi. Image akhir hanya berisi artefak biner murni atau bundle yang siap dieksekusi.
  3. Pemanfaatan Cache Mount BuildKit: Gunakan sintaks # syntax=docker/dockerfile:1.7 dan opsi --mount=type=cache agar unduhan dependensi paket tidak diulang setiap kali ada perubahan kode sumber.
  4. Healthcheck & Urutan Dependensi: Selalu definisikan mekanisme pemeriksaan kesehatan kontainer dan gunakan depends_on: [service]: condition: service_healthy pada compose.yaml untuk mencegah race condition saat database belum siap menerima koneksi.
  5. Isolasi Jaringan Internal: Letakkan database dan cache pada jaringan internal dengan flag internal: true sehingga tidak dapat diakses secara langsung dari luar jaringan kontainer.

Matriks Eksekusi Berdaulat, Efisiensi Token & Invarian

DimensiMandat Berdaulat & Kontrak Deterministik
Kaskade Model FrontierMedium / High (GPT-5.6 Sol Medium, Gemini 4 Argon, Claude Sonnet 5.5 High, Grok 4.7 High Fast)
Invarian Fallback KetersediaanGemini 4 Argon/Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6 (Bebas gagal saat model belum tersedia/kuota penuh)
Protokol Hemat Token & KV-CacheKunci instruksi & skema statis di prefix awal (kv-cache-prefix-optimizer); kirim potongan CONTEXT_MAP.md (<250 token/panggilan) saat Fan-Out
Eksekusi SaaT CLI & MCPCLI: vibes skill exec docker-container-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_ast_query, vibes_compile_cache, vibes_optimize_budget, vibes_verify_gate
Invarian NFR & Anti-SlopLatensi P99 API < 85ms, paritas skema ketat OpenAPI 3.1 / TypeSpec, kontrak error RFC 9457 Problem Details, penegakan Idempotency-Key; kode 100% tuntas tanpa placeholder diverifikasi melalui node scripts/check-anti-slop.js --strict

Frequently asked questions

What does the Docker Container Expert AI skill do?

Production Docker containerization, BuildKit, distroless, and Compose / Kontainerisasi Docker produksi, BuildKit, distroless, dan Compose.

Why use Docker Container Expert on TypingMind?

Because you install it once and use it with any model. Docker Container Expert is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Docker Container Expert in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/roedyrustam/vibes-plug/tree/main/skills/docker-container-expert. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Docker Container Expert?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Docker Container Expert?

As many as you like. As long as a model supports skills, you can use Docker Container Expert with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Docker Container Expert AI skill free?

Yes. It is published on GitHub by roedyrustam under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇