Dopamine AI Prompt Library
Open search
Menu

Added Nov 26, 2026

Prompt

dockerfile-taste.mdMarkdown · 24 lines · about 750 tokens
# Dockerfile taste of a platform engineer who wants small, boring, reproducible images
- Use multi-stage builds: compile and install dev dependencies in a builder stage, copy only the runtime artifacts into the final stage. Confidence: 0.95
- Pin base images to a specific version tag plus digest (`node:22.11-slim@sha256:...`), never `latest`. Confidence: 0.90
- Prefer slim or distroless runtime bases over full distro images; reach for Alpine only when musl is known to be safe for the stack. Confidence: 0.80
- Order layers from least to most frequently changing: system packages, then lockfile and dependency install, then application source. Confidence: 0.95
- Copy the lockfile alone before `COPY . .` so dependency layers stay cached when only source changes. Confidence: 0.95
- Keep a strict `.dockerignore` that excludes `.git`, `node_modules`, local env files, test output and build caches. Confidence: 0.90
- Run as a non-root user with a fixed UID/GID, created in the image and set with `USER`. Confidence: 0.95
- Use BuildKit cache mounts (`RUN --mount=type=cache`) for package manager caches instead of baking caches into layers. Confidence: 0.85
- Pass secrets with `RUN --mount=type=secret`; never `ARG` or `ENV` a token, and never `COPY` a credentials file. Confidence: 0.95
- Combine `apt-get update` and `apt-get install --no-install-recommends` in one `RUN` and clean `/var/lib/apt/lists` in the same layer. Confidence: 0.90
- Pin system package versions only when reproducibility matters more than security patches; otherwise rebuild images on a schedule. Confidence: 0.65
- Use the exec form for `ENTRYPOINT` and `CMD` so the process receives signals as PID 1. Confidence: 0.90
- Add a tiny init (`tini` or `--init`) when the app spawns children or does not reap zombies itself. Confidence: 0.75
- One process per container; sidecars and supervisors belong to the orchestrator, not to the image. Confidence: 0.85
- Configure the app through environment variables at runtime; images stay identical across staging and production. Confidence: 0.90
- Set `WORKDIR` explicitly and avoid `cd` inside `RUN` chains. Confidence: 0.80
- Prefer `COPY` over `ADD`; use `ADD` only for its documented remote checksum or archive behavior on purpose. Confidence: 0.85
- Add OCI labels (`org.opencontainers.image.source`, `revision`, `created`) from CI build args. Confidence: 0.75
- Define a `HEALTHCHECK` only when no orchestrator probe exists; on Kubernetes rely on readiness and liveness probes instead. Confidence: 0.70
- Lint Dockerfiles with hadolint and scan final images with Trivy or Grype in CI, failing on critical CVEs. Confidence: 0.85
- Build multi-arch images (`linux/amd64`, `linux/arm64`) with `docker buildx` and push a single manifest list. Confidence: 0.75
- Tag images with the immutable git SHA; treat human-friendly tags like `v1.4` as moving pointers. Confidence: 0.85
- Keep the final image under a size budget and check it in CI with `docker image inspect` or dive. Confidence: 0.65

About this prompt

Content type
Code
Industries
Software Development
Models
GPT
Languages
English
Length
24 lines, about 750 tokens
Added
Nov 26, 2026
License
CC0
Request takedown
chloe_writes41 prompts
Profile

More from chloe_writes

View all

Note

For every question and pdf I will be sending I want you to act like an extraordinary person fill with the best ever known wisdom why giving answer and explain in I want it to be easy to assimilate and memonic where necessary

LinkedIn "About" Section Writer — 3 Professional Styles

ROLE You are an expert tech recruiter and professional copywriter specializing in LinkedIn branding. TASK Write 3 options for my LinkedIn "About" (Summary) section based on my background and target goals. INPUT DATA: - Role: ${role:Your current job title} - Experience: ${experience:Years of experience and key focus areas} - Key Achievements: ${achievements:Metrics, projects, or things you are p

Docker Compose taste

# Docker Compose taste of a developer who wants one-command local environments - Make `docker compose up` the only command a new teammate needs to start the full local stack. Confidence: 0.90 - Name the file `compose.yaml` and drop the obsolete top-level `version:` key. Confidence: 0.85 - Pin every image to a specific version tag, never `latest`, so the stack behaves the same next month. Confidenc

Learn to Speak Spanish

Act as a Spanish Language Tutor. You are an expert in teaching Spanish to beginners and intermediate learners. Your task is to guide users in learning Spanish through structured lessons and interactive practice. You will: - Provide vocabulary and grammar lessons - Offer pronunciation tips - Conduct interactive speaking exercises - Answer questions related to Spanish language and culture Rules: -