
Configure Container
- 51 installs
- 49 repo stars
- Updated August 4, 2026
- laurigates/claude-plugins
Helps with ai & agent building tasks.
About
configure-container is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- configure-container
- AI & Agent Building
- AI-coding skill
Configure Container by the numbers
- 51 all-time installs (skills.sh)
- Ranked #7,162 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/laurigates/claude-plugins --skill configure-containerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 51 |
|---|---|
| repo stars | ★ 49 |
| Last updated | August 4, 2026 |
| Repository | laurigates/claude-plugins ↗ |
What it does
Helps with ai & agent building tasks.
Files
/configure:container
Check and configure comprehensive container infrastructure against project standards with emphasis on minimal images, non-root users, and security hardening.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|---|
| Auditing container infrastructure compliance (Dockerfile, workflows, scanning) | Writing a Dockerfile from scratch (/configure:dockerfile) |
| Checking multi-stage builds, non-root users, and security hardening | Configuring Kubernetes deployments (/configure:skaffold) |
| Setting up container build workflows with GHCR and multi-platform support | Running vulnerability scans on a built image (Trivy CLI directly) |
Verifying .dockerignore, OCI labels, and base image versions | Configuring devcontainer features for VS Code |
| Adding Trivy/Grype scanning to CI pipelines | Debugging container runtime issues (system-debugging agent) |
Context
- Dockerfiles: !
find . -maxdepth 2 \( -name 'Dockerfile' -o -name 'Dockerfile.*' -o -name '*.Dockerfile' \) - Docker ignore: !
find . -maxdepth 1 -name '.dockerignore' - Container workflows: !
find .github/workflows -maxdepth 1 \( -name '*container*' -o -name '*docker*' -o -name '*build*' \) - Devcontainer: !
find .devcontainer -maxdepth 1 -name 'devcontainer.json' - Skaffold: !
find . -maxdepth 1 -name 'skaffold.yaml' - Package files: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' -o -name 'go.mod' \) - Project standards: !
find . -maxdepth 1 -name '.project-standards.yaml'
Parameters
Parse from command arguments:
--check-only: Report compliance status without modifications (CI/CD mode)--fix: Apply fixes automatically without prompting--component <name>: Check specific component only (dockerfile, workflow, registry, scanning, devcontainer)
Security Philosophy
Minimal Attack Surface: Smaller images = fewer vulnerabilities. Use Alpine (~5MB) for Node.js, slim (~50MB) for Python.
Non-Root by Default: ALL containers MUST run as non-root users.
Multi-Stage Required: Separate build and runtime environments. Build tools and dev dependencies should NOT be in production images.
Execution
Execute this container infrastructure compliance check:
Step 1: Detect container-related files
Search for Dockerfile, workflow files, devcontainer config, and .dockerignore. Detect the project type (frontend, python, go, rust, infrastructure) from package files.
Step 2: Look up latest base image versions
Use WebSearch or WebFetch to verify current versions before flagging outdated images: 1. Node.js Alpine images: Check Docker Hub for latest LTS Alpine tags 2. Python slim images: Check Docker Hub for latest slim tags 3. nginx Alpine: Check Docker Hub for latest Alpine tags 4. GitHub Actions: Check release pages for latest action versions 5. Trivy: Check aquasecurity/trivy-action releases
Step 3: Analyze each component
Check each component against standards:
Dockerfile Standards:
| Check | Standard | Severity |
|---|---|---|
| Exists | Required for containerized projects | FAIL if missing |
| Multi-stage | Required (build + runtime stages) | FAIL if missing |
| HEALTHCHECK | Required for K8s probes | FAIL if missing |
| Non-root user | REQUIRED (not optional) | FAIL if missing |
| .dockerignore | Required | WARN if missing |
.dockerignore Dockerfile* | Use glob to exclude all Dockerfile variants from context | WARN if only Dockerfile |
| Base image version | Latest stable (check Docker Hub) | WARN if outdated |
| Minimal base | Alpine for Node, slim for Python | WARN if bloated |
Base Image Standards (verify latest before reporting):
| Language | Build Image | Runtime Image | Size Target |
|---|---|---|---|
| Node.js | node:24-alpine (LTS) | nginx:1.27-alpine | < 50MB |
| Python | python:3.13-slim | python:3.13-slim | < 150MB |
| Go | golang:1.23-alpine | scratch or alpine:3.21 | < 20MB |
| Rust | rust:1.84-alpine | alpine:3.21 | < 20MB |
Security Hardening Standards:
| Check | Standard | Severity |
|---|---|---|
| Non-root USER | Required (create dedicated user) | FAIL if missing |
| Read-only FS | --read-only or RO annotation | INFO if missing |
| No new privileges | --security-opt=no-new-privileges | INFO if missing |
| Drop capabilities | --cap-drop=all + explicit --cap-add | INFO if missing |
| No secrets in image | No ENV with sensitive data | FAIL if found |
Build Workflow Standards:
| Check | Standard | Severity |
|---|---|---|
| Workflow exists | container-build.yml or similar | FAIL if missing |
| checkout action | v4+ | WARN if older |
| build-push-action | v6+ | WARN if older |
| Multi-platform | linux/amd64,linux/arm64 | WARN if missing |
| Build caching | GHA cache enabled | WARN if missing |
| Security scan | Trivy/Grype in workflow | WARN if missing |
id-token: write | Required when provenance/SBOM configured | WARN if missing |
| Cache scope | Explicit scope= for multi-image builds | WARN if missing |
| Scanner pinned | Trivy/Grype action pinned by SHA (not @master) | WARN if unpinned |
Container Labels Standards (GHCR Integration):
| Check | Standard | Severity |
|---|---|---|
org.opencontainers.image.source | Required - Links to repository | WARN if missing |
org.opencontainers.image.description | Required - Package description | WARN if missing |
org.opencontainers.image.licenses | Required - SPDX license | WARN if missing |
Run /configure:dockerfile for detailed Dockerfile checks if needed.
Step 4: Generate compliance report
Print a formatted compliance report:
Container Infrastructure Compliance Report
==============================================
Project Type: frontend (detected)
Component Status:
Dockerfile PASS
Build Workflow PASS
Registry Config PASS
Container Scanning WARN (missing)
Devcontainer SKIP (not required)
.dockerignore PASS
Dockerfile Checks:
Multi-stage 2 stages PASS
HEALTHCHECK Present PASS
Base images node:22, nginx PASS
Build Workflow Checks:
Workflow container-build.yml PASS
checkout v4 PASS
build-push-action v6 PASS
Multi-platform amd64,arm64 PASS
GHA caching Enabled PASS
Container Labels Checks:
image.source In metadata-action PASS
image.description Custom label set PASS
image.licenses Not configured WARN
Recommendations:
- Add org.opencontainers.image.licenses label to workflow
- Add Trivy or Grype vulnerability scanning to CI
Overall: 2 warnings, 1 infoIf --check-only, stop here.
Step 5: Apply fixes (if --fix or user confirms)
1. Missing Dockerfile: Run /configure:dockerfile --fix 2. Missing build workflow: Create from template in REFERENCE.md 3. Missing scanning: Add Trivy scanning job 4. Missing .dockerignore: Create standard .dockerignore from REFERENCE.md 5. Outdated actions: Update version numbers
Step 6: Update standards tracking
Update .project-standards.yaml:
components:
container: "2025.1"
dockerfile: "2025.1"
container-workflow: "2025.1"For detailed templates (Dockerfile, workflow, devcontainer, .dockerignore), see REFERENCE.md.
Agentic Optimizations
| Context | Command |
|---|---|
| Quick compliance check | /configure:container --check-only |
| Auto-fix all issues | /configure:container --fix |
| Dockerfile only | /configure:container --check-only --component dockerfile |
| Workflow only | /configure:container --check-only --component workflow |
| Scanning only | /configure:container --fix --component scanning |
| Find all Dockerfiles | find . -maxdepth 2 \( -name 'Dockerfile' -o -name 'Dockerfile.*' \) 2>/dev/null |
Flags
| Flag | Description |
|---|---|
--check-only | Report status without offering fixes |
--fix | Apply fixes automatically |
--component <name> | Check specific component only (dockerfile, workflow, registry, scanning, devcontainer) |
Component Dependencies
Container Infrastructure
├── Dockerfile (required)
│ └── .dockerignore (recommended)
├── Build Workflow (required for CI/CD)
│ ├── Registry config
│ └── Multi-platform builds
├── Container Scanning (recommended)
│ └── SBOM generation (optional)
└── Devcontainer (optional)
└── VS Code extensionsNotes
- Multi-platform builds: Essential for M1/M2 Mac developers and ARM servers
- GHCR: GitHub Container Registry is preferred for GitHub-hosted projects
- Trivy: Recommended scanner for comprehensive vulnerability detection
- Alpine vs Slim: Use Alpine for Node.js/Go/Rust. Use slim (Debian) for Python (musl compatibility issues)
- Non-root is mandatory: Never run containers as root in production
- Version pinning: Always use specific version tags, never
latest
See Also
/configure:dockerfile- Dockerfile-specific configuration/configure:workflows- GitHub Actions workflow configuration/configure:skaffold- Kubernetes development configuration/configure:security- Security scanning configuration/configure:all- Run all compliance checkscontainer-developmentskill - Container best practicesci-workflowsskill - CI/CD workflow patterns
Container Infrastructure Reference
Templates for container builds, workflows, scanning, and devcontainers.
Container Build Workflow (with Security Scanning)
name: Build Container
on:
push:
branches: [main]
tags: ['v*.*.*']
pull_request:
branches: [main]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
security-events: write
id-token: write # Required for provenance/SBOM attestations
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.title=${{ github.event.repository.name }}
org.opencontainers.image.description=${{ github.event.repository.description }}
org.opencontainers.image.vendor=Your Organization
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
# For release-please component tags — escape dots in regex
type=match,pattern=.*-v(\d+\.\d+\.\d+),group=1
type=match,pattern=.*-v(\d+\.\d+),group=1
type=match,pattern=.*-v(\d+),group=1
- id: build-push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=app
cache-to: type=gha,mode=max,scope=app
provenance: ${{ startsWith(github.ref, 'refs/tags/') && 'mode=max' || 'false' }}
sbom: ${{ startsWith(github.ref, 'refs/tags/') }}
# Pin Trivy by SHA — never use @master
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # 0.34.0
with:
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
if: always()
with:
sarif_file: 'trivy-results.sarif'
- name: Job summary
if: always()
run: |
echo "## Container Build" >> $GITHUB_STEP_SUMMARY
echo "- **Image**: \`${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}\`" >> $GITHUB_STEP_SUMMARY
echo "- **Digest**: \`${{ steps.build-push.outputs.digest }}\`" >> $GITHUB_STEP_SUMMARY
echo "- **Tags**:" >> $GITHUB_STEP_SUMMARY
echo '${{ steps.meta.outputs.tags }}' | while read -r tag; do
echo " - \`$tag\`" >> $GITHUB_STEP_SUMMARY
done.dockerignore Template
# Git
.git
.gitignore
# CI/CD
.github
.gitlab-ci.yml
# Dockerfiles (prevent variants leaking into build context)
Dockerfile*
# IDE
.idea
.vscode
*.swp
*.swo
# Dependencies (rebuilt in container)
node_modules
.venv
__pycache__
*.pyc
# Build artifacts
dist
build
target
# Test and coverage
coverage
.coverage
.pytest_cache
.nyc_output
# Documentation
docs
*.md
!README.md
# Environment
.env
.env.*
*.local
# Temporary
tmp
temp
*.tmp
*.logDockerfile Template (Node.js/Frontend - Non-Root Alpine)
# Build stage - use Alpine for minimal size
FROM node:24-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN --mount=type=cache,target=/root/.npm npm ci --only=production
COPY . .
RUN --mount=type=cache,target=/root/.npm \
--mount=type=cache,target=/app/node_modules/.vite \
npm run build
# Runtime stage - minimal nginx Alpine
FROM nginx:1.27-alpine
LABEL org.opencontainers.image.source="https://github.com/OWNER/REPO" \
org.opencontainers.image.description="Production frontend application" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.vendor="Forum Virium Helsinki"
ARG VERSION=dev
ARG BUILD_DATE
ARG VCS_REF
LABEL org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}"
RUN addgroup -g 1001 -S appgroup && \
adduser -u 1001 -S appuser -G appgroup
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx/default.conf.template /etc/nginx/templates/
RUN chown -R appuser:appgroup /var/cache/nginx /var/run /var/log/nginx && \
chmod -R 755 /var/cache/nginx /var/run /var/log/nginx
USER appuser
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1Dockerfile Template (Python - Non-Root Slim)
FROM python:3.13-slim AS builder
WORKDIR /app
RUN pip install --no-cache-dir uv
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
FROM python:3.13-slim
LABEL org.opencontainers.image.source="https://github.com/OWNER/REPO" \
org.opencontainers.image.description="Production Python API server" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.vendor="Forum Virium Helsinki"
ARG VERSION=dev
ARG BUILD_DATE
ARG VCS_REF
LABEL org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}"
RUN groupadd -g 1001 appgroup && \
useradd -u 1001 -g appgroup -s /bin/false appuser
WORKDIR /app
COPY --from=builder /app/.venv /app/.venv
COPY --chown=appuser:appgroup . .
ENV PATH="/app/.venv/bin:$PATH" \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
USER appuser
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" || exit 1
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]Dockerfile Template (Go - Scratch/Distroless)
FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /app/server ./cmd/server
FROM scratch
LABEL org.opencontainers.image.source="https://github.com/OWNER/REPO" \
org.opencontainers.image.description="Production Go service" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.vendor="Forum Virium Helsinki"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/server /server
USER 1001:1001
EXPOSE 8080
ENTRYPOINT ["/server"]Devcontainer Template (Node/Frontend)
{
"name": "Project Dev Container",
"image": "mcr.microsoft.com/devcontainers/typescript-node:24",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"biomejs.biome",
"ms-azuretools.vscode-docker"
]
}
},
"postCreateCommand": "npm install",
"forwardPorts": [3000, 5173],
"remoteUser": "node"
}Devcontainer Template (Python)
{
"name": "Python Dev Container",
"image": "mcr.microsoft.com/devcontainers/python:3.13",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"charliermarsh.ruff",
"ms-azuretools.vscode-docker"
]
}
},
"postCreateCommand": "pip install uv && uv sync",
"forwardPorts": [8000],
"remoteUser": "vscode"
}