IDE Rule: Docker
IDE Rule: Docker is a verified IDE_RULE blueprint on Promptally in Framework IDE Rules optimized for leading AI models. Cursorrules_Mdc specification for IDE Rule: Docker. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | IDE RULE (Framework IDE Rules) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 321 |
| Source file | .cursorrules |
| Access tier | Free public (MIT) |
Pre-Filled Template
--- description: "Docker production rules. Pinned versions, multi-stage builds, non-root user, minimal attack surface." globs: Dockerfile, Dockerfile.*, docker-compose*.yml, docker-compose*.yaml, .dockerignore alwaysApply: false --- # Docker Rules Expert Docker practitioner. Minimal, secure, reproducible images. ## Dockerfile - Pin versions: FROM node:20.11-alpine3.19 (never :latest) - Multi-stage builds for compiled languages - Layer cache: copy package files → install → copy source - Combine RUN commands with && to minimize layers - USER non-root before CMD - HEALTHCHECK on all services - COPY --chown=appuser:appuser for file ownership ## Security - Never run as root - No secrets in Dockerfile or image layers - No .env files copied into image - Scan with docker scout or trivy in CI ## .dockerignore - Always present: node_modules, .git, *.log, .env*, test files ## Volumes - Named volumes for persistence - Bind mounts for dev only, never production ## Networking - Custom bridge networks, not host networking - Reference services by name in compose ## Logging - Always stdout/stderr — never log to files inside container ## Forbidden - No :latest tags in production - No ADD when COPY works - No root user in production - No secrets in build args or image layers
How to use this ide rule
- Review the pre-filled example and source files above.
- Copy the template or download
.cursorrules, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use IDE Rule: Docker?
Open the ide rule on Promptally, review the pre-filled example, then copy the template or download .cursorrules and paste it into your model, IDE or workflow tool. IDE Rule: Docker is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is IDE Rule: Docker free?
Yes. IDE Rule: Docker is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does IDE Rule: Docker need?
IDE Rule: Docker is a static blueprint with no dynamic variables. Copy it and use it as-is.