Skip to content
Back to skills

Dockerfile Hardened+Dockerfile Catalog

ASecurity

Merged skill that replaces `dockerfile-hardened` and `dockerfile-catalog`. Use for any Dockerfile.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
ai-agentspythonfastapidockerapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned December 1, 2026

npx -y skills add danielrispler/skill-truce --skill dockerfile-hardened+dockerfile-catalog --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dockerfile Hardened+Dockerfile Catalog?

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

Security grade badge for Dockerfile Hardened+Dockerfile Catalog
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/danielrispler-dockerfile-hardened-dockerfile-catalog/badge)](https://www.skillsdirectory.com/skills/danielrispler-dockerfile-hardened-dockerfile-catalog)

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-hardened+dockerfile-catalog
description: Merged skill that replaces `dockerfile-hardened` and `dockerfile-catalog`. Use for any Dockerfile.
---

# Merged skill: dockerfile-hardened + dockerfile-catalog

This skill replaces `dockerfile-hardened` and `dockerfile-catalog`. It keeps every rule of both skills that can hold at the same time. Follow every rule below.

## Rules kept unchanged from `dockerfile-hardened`

- Declare `STOPSIGNAL SIGTERM` so that the container shuts down gracefully.
- Declare a `HEALTHCHECK` instruction that probes the service.
- Run the service as a non-root user given by numeric ID, with an instruction such as `USER 10001`.
- Declare the build argument `ARG APP_VERSION=dev` so that the pipeline can stamp the image.
- Set the working directory with `WORKDIR /opt/service`. No other working directory may be used anywhere in the file.

## Rules kept unchanged from `dockerfile-catalog`

- Explain each `RUN` instruction with a comment line directly above it that starts with `# step: `.
- Describe the image with a `LABEL` instruction that sets `org.opencontainers.image.description`.
- Fix the container time zone with `ENV TZ=UTC`.

## Reconciled rules (each one satisfies a rule of both skills at once)

- The first line of the file must be the parser directive `# syntax=docker/dockerfile:1`. Put the header comment `# Owner: <team>` on the second line, directly below the directive and above `FROM`, so that it still sits at the top of the file.

## Example

Request: Write the Dockerfile for a Python 3.12 FastAPI service that listens on port 8000, installs dependencies from requirements.txt and starts with `uvicorn app.main:app`. Owning team: platform-api.

Output:

```
# syntax=docker/dockerfile:1
# Owner: platform-api
FROM python:3.12-slim
ARG APP_VERSION=dev
LABEL org.opencontainers.image.description="FastAPI service on port 8000"
ENV TZ=UTC
WORKDIR /opt/service
COPY requirements.txt .
# step: install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
USER 10001
EXPOSE 8000
HEALTHCHECK CMD python -c "import urllib.request as u; u.urlopen('http://localhost:8000/health')"
STOPSIGNAL SIGTERM
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
```

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.