baasith6/cursor-skills/adding-docker

Claude Code and agent skill by baasith6/cursor-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Dockerize an application with a production-ready Dockerfile, docker-compose setup, and .dockerignore.

Install

npx vskill@latest install baasith6/cursor-skills/adding-docker

SKILL.md

The same SKILL.md was published earlier as spencerpauly/awesome-cursor-skills/adding-docker.

Add Docker

Use this skill when the user asks to dockerize, containerize, or add Docker support to an application.

Steps

  1. Detect the runtime — inspect package.json, requirements.txt, go.mod, Cargo.toml, etc. to determine the language and runtime.
  1. Create a multi-stage `Dockerfile`

For Node.js (example):

```dockerfile FROM node:20-alpine AS base

FROM base AS deps WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci --omit=dev

FROM base AS build WORKDIR /app COPY package.json package-lock.json ./ RUN npm ci COPY . . RUN npm run build

FROM base AS runner WORKDIR /app ENV NODE_ENV=production COPY --from=deps /app/node_modules ./node_modules COPY --from=build /app/.next ./.next COPY --from=build /app/public ./public COPY --from=build /app/package.json ./ EXPOSE 3000 CMD ["npm", "start"] ```

Adapt for the detected framework — adjust the build output directory, entry command, and base image.

  1. Create `.dockerignore`

`` node_modules .next .git .env* *.md ``

  1. Create `docker-compose.yml` (if the app has dependencies like a database or Redis):

```yaml services: app: build: . ports:

  • "3000:3000"

env_file: .env depends_on:

  • db

db: image: postgres:16-alpine environment: POSTGRES_DB: app POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres volumes:

  • pgdata:/var/lib/postgresql/data

volumes: pgdata: ```

  1. Add npm scripts (optional)

``json { "docker:build": "docker build -t myapp .", "docker:run": "docker compose up" } ``

Notes

  • Use Alpine-based images to minimize image size.
  • Never copy .env files into the image — use env_file or runtime injection.
  • For monorepos, use a .dockerignore that excludes sibling packages not needed by the target app.
  • Add a HEALTHCHECK instruction for production deployments.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/baasith6/cursor-skills/adding-docker/badge)](https://verified-skill.com/skills/baasith6/cursor-skills/adding-docker)

Something wrong with this skill or its page? Tell us.