Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
netresearch avatar

Docker Development

  • 227 installs
  • 16 repo stars
  • Updated August 2, 2026
  • netresearch/docker-development-skill

Containerize services, run multi-service stacks locally, and debug Dockerfile issues so backend APIs and workers behave consistently from dev through deployment.

About

Provides Docker-centric development guidance for building, running, and troubleshooting containerized applications: compose stacks, Dockerfile patterns, networking, volumes, and iterative local debugging aligned with backend delivery.

  • Dockerfile best practices
  • docker compose multi-service dev
  • Local env parity with production
  • Container debugging workflows
  • Image layering and cache efficiency

Docker Development by the numbers

  • 227 all-time installs (skills.sh)
  • +12 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #379 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/netresearch/docker-development-skill --skill docker-development

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs227
repo stars16
Last updatedAugust 2, 2026
Repositorynetresearch/docker-development-skill

What it does

Containerize services, run multi-service stacks locally, and debug Dockerfile issues so backend APIs and workers behave consistently from dev through deployment.

Files

SKILL.mdMarkdownGitHub ↗

Docker Development

Patterns for building, testing, and deploying Docker containers.

Core Principles

1. Minimal -- Alpine/distroless, multi-stage 2. Secure -- Non-root USER, no layer secrets, pin versions 3. Testable -- CI-verifiable: entrypoint bypass, DNS mocking 4. Cache-efficient -- deps first, clean in same layer

Quick Reference

Multi-Stage Build (Node.js)

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .

FROM node:20-alpine
RUN addgroup -g 1001 app && adduser -u 1001 -G app -D app
USER app
COPY --from=builder /app .
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD wget -qO- http://localhost:3000/health || exit 1
CMD ["node", "server.js"]

Multi-Stage Build (Go -- scratch/distroless)

FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /app/server .

FROM gcr.io/distroless/static:nonroot
COPY --from=builder /app/server /server
CMD ["/server"]

Layer Optimization

RUN apt-get update && \
    apt-get install -y --no-install-recommends curl && \
    rm -rf /var/lib/apt/lists/*

Build Cache: Copy Dependency Files First

COPY package*.json ./
RUN npm ci
COPY . .

Manifests before source keeps install layers cached on source-only changes.

BuildKit Secrets

RUN --mount=type=secret,id=ssh_key,dst=/root/.ssh/id_rsa git clone git@github.com:org/repo.git

ENV/ARG/COPY secrets persist in docker history. Use --mount=type=secret.

Docker Bake (Multi-Platform)

target "app" {
  platforms = ["linux/amd64", "linux/arm64"]
  cache-from = ["type=gha"]
  cache-to = ["type=gha,mode=max"]
}

Security Anti-Patterns

Anti-patternFix
FROM image:latestPin version: image:1.2.3-alpine
No USER directiveadduser + USER appuser
chmod 777Use specific permissions: chmod 550
privileged: true in composeRemove or use specific cap_add
volumes: [/:/host]Mount only needed paths
ports: ["0.0.0.0:3000:3000"]Bind to 127.0.0.1:3000:3000
ENV DB_PASSWORD=secretUse --mount=type=secret or compose secrets

CI Testing Gotchas

1. Bypass entrypoint: docker run --rm --entrypoint php myimage -v 2. Mock upstream DNS: docker run --rm --add-host backend:127.0.0.1 nginx-image nginx -t 3. Compose validation: cp .env.example .env before docker compose config 4. Secret scanning: Exclude .env.example, README, docs from scanners 5. Root-owned artifacts: in-container installs leave root-owned bind-mount dirs (EACCES on host) -- references/bind-mount-ownership.md

.dockerignore

Exclude: .git, node_modules/vendor, .env*, *.pem, *.key

Compose Essentials

  • startup ordering: depends_on.condition: service_healthy + healthcheck start_period
  • networks.internal: true isolates databases from external access
  • profiles: [debug]: services start only with --profile debug

References

  • references/ci-testing.md -- CI testing patterns for Docker images
  • references/dind-testing-patterns.md -- Docker-in-Docker (DinD) testing patterns
  • references/bind-mount-ownership.md -- root-owned bind-mount artifacts

Related skills

DevOps & CI/CDdevopsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.