Use when hardening Docker containers and images.
Scanned 9/10/2026
Install to Claude Code
npx -y skills add LoopyLuci/Skills --skill docker-security-hardening --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Docker Security Hardening?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/loopyluci-docker-security-hardening)More formats (shields.io, HTML) on the badges page.
---
name: docker-security-hardening
description: "Use when hardening Docker containers and images."
category: docker
tags: [docker, security, hardening, scanning]
---
# Docker Security Hardening
Hardening containers and images.
## Non-Root User
```dockerfile
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
COPY --chown=appuser:appgroup . /app
```
## Read-Only Rootfs
```powershell
docker run --read-only --tmpfs /tmp --tmpfs /var/run myapp
```
## Drop Capabilities
```powershell
docker run --cap-drop ALL --cap-add NET_BIND_SERVICE myapp
```
## Image Scanning
```powershell
docker scout quickview myapp:latest
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \\
aquasec/trivy image myapp:latest
```
## Secrets (don't bake in)
```powershell
docker run --secret id=db_pass,src=./secrets/db_pass.txt myapp
```
## Dockerfile
```dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends pkg \\
&& rm -rf /var/lib/apt/lists/*
FROM node:20.11.0-alpine3.18 # pin versions, not "latest"
```
## Pitfalls
- "latest" tags change -- pin versions
- Env vars with secrets leak to docker history -- use --secret
- --privileged defeats all security -- avoid
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...
Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.
Recovers prior coding-agent session context by running `catchup <agent> --since-compact`, which extracts a clean summary of a previous Codex, Claude Code, Antigravity, OpenCode, or Pi Agent session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", or asks to recover/summarize a previous session before continuing. Do NOT use for the current conversation, git history, or any non-agent log.
A comprehensive mathematical reasoning skill for AI assistants — handles arithmetic to research-level problems with rigorous step-by-step reasoning, systematic verification, and transparent uncertainty handling