Skip to content
Back to skills

Dockerfile

ASecurity

Use when editing tracked Backstage, agent, MCP, or Golden Path Dockerfiles.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 4, 2026
ai-agentsgodockerkubernetesgit

Works with

  • mcp

Security analysis

A100/100

Scanned September 4, 2026

npx -y skills add paulasilvatech/awesome-harness-primitives --skill dockerfile --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dockerfile?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dockerfile
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/paulasilvatech-dockerfile/badge)](https://www.skillsdirectory.com/skills/paulasilvatech-dockerfile)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dockerfile
description: Use when editing tracked Backstage, agent, MCP, or Golden Path Dockerfiles.
paths:
  - backstage/**/Dockerfile
  - mcp-servers/Dockerfile
  - scripts/golden-paths/**/Dockerfile
user-invocable: false
---

<!-- Generated from harness/github-copilot/plugins/open-horizons-platform/instructions/dockerfile.instructions.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->

# Dockerfiles

## Conventions

- Pin base images to an explicit supported version; production Dockerfiles must not use `latest`.
- Use multi-stage builds so compilers, caches, tests, and development dependencies stay out of the runtime image.
- Copy dependency manifests before source to preserve cacheability and use the package manager matching the lockfile.
- Run the final process as a non-root user with only required files and writable directories.
- Keep credentials out of `ARG`, `ENV`, layers, build context, and package-manager configuration; use build secrets only in approved CI.
- Use exec-form entrypoints, propagate termination signals, and expose only documented service ports.
- Minimize packages, remove caches in the same layer, and keep runtime versions aligned with local manifests.
- Keep health behavior consistent with Compose and Kubernetes probes rather than adding a conflicting endpoint.

## Verification

- The intended target builds from a clean context.
- Image inspection confirms the non-root user, pinned base, and absence of secret material.
- The container starts and responds on its documented health endpoint.

## Do / Do Not

| Do | Do not |
| --- | --- |
| Pin base images, minimize build context, and execute as a non-root user. | Bake credentials, mutable bases, or unnecessary build artifacts into an image. |
| Keep health behavior aligned with deployed probes. | Add a conflicting or artificial health endpoint. |

## Checklist Before Opening a PR

- [ ] The change matches this instruction's `applyTo` scope.
- [ ] The intended target builds from a clean context.
- [ ] Image inspection verifies the base, user, and absence of secrets.
- [ ] The container responds on the documented health endpoint.
- [ ] No unrelated edits or unresolved placeholders remain.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…