AI SummaryCursor Rules for Docker containerization best practices that guide developers on container strategy, Dockerfile optimization, and security-first approaches for consistent development and production environments.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "ai-template — Cursor Rules" prompt rules to my project. Repository: https://github.com/jasonstcyrx/ai-template Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Cursor Rules for ai-template
Install development tools
RUN yarn global add @nestjs/cli EXPOSE 3000 3001 CMD ["yarn", "start:dev"] `
Core Principles
• All services must be containerized for consistent development and deployment • Multi-stage builds for optimized production images • Security-first approach with non-root users and minimal base images • Environment parity between development, staging, and production
Multi-stage build for React/Next.js application
FROM node:18-alpine AS deps WORKDIR /app COPY package.json yarn.lock ./ RUN yarn install --frozen-lockfile --production=false FROM node:18-alpine AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . RUN yarn build FROM node:18-alpine AS runner WORKDIR /app
Create non-root user
RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts