docker-patterns
Skill0 starsChanged 4 months agoMITView on GitHub
Docker best practices for Hermes Agent — multi-stage builds, security hardening, compose patterns, and container optimization.
- Reads credentials
- Installs packages
43 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- Lukk17/agent-standardstheir own version, first seen Nov 7, 2026
- pankaj-mahaur/Agent-Daemontheir own version, first seen Nov 6, 2026
- ku5ic/claude-kittheir own version, first seen Nov 4, 2026
Used with
Projects with it also use content-hash-cache-pattern, configure-ecc and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
royaluniondesign-sysSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 14 projects that use this
royaluniondesign-sysSkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 9 projects that use this
junimnjwSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 9 projects that use this
Yog-SothoSkillpytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading. Always activate when the user is writing PyTorch models or training scripts, reviewing deep learning code, debugging training loops or data pipelines, optimizing GPU memory or training speed, setting up reproducible experiments, implementing transfer learning or fine-tuning, or asks anything about nn.Module, DataLoader, autograd, AMP, or torch.compile.
Also in 11 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 7 projects that use this
junimnjwSkillcarrier-relationship-management
Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.
Also in 7 projects that use this
- +2 more from royaluniondesign-sys
- +1 more from junimnjw
Other versions43 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 43
- loulanyue/awesome-claude-notes★ 272same name
- langchain-ai/skills-benchmarks★ 116same name
- tranhieutt/software_development_department★ 71same name
- Fmarzochi/EGC★ 61same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- skateddu/claude-code-python-setup★ 28same name
- woxiangyangzhimao/skills★ 14same name
- pekral/cursor-rules★ 10same name
- edjchapman/claude-code-config★ 8same name
- gongyijie85/dsh-ecc★ 8same name
33 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- agent-architecture-auditSkill
- agent-evalSkill
- agent-harness-constructionSkill
- agentic-engineeringSkill
- ai-first-engineeringSkill
- api-designSkill
- architecture-decision-recordsSkill
- autonomous-agent-harnessSkill
- autonomous-loopsSkill
- backend-patternsSkill
- benchmark-methodologySkill
- benchmark-optimization-loopSkill
- blueprintSkill
- codebase-onboardingSkill
- codehealth-mcpSkill
- coding-standardsSkill
- context-budgetSkill
- continuous-agent-loopSkill
- cost-aware-llm-pipelineSkill
- database-migrationsSkill
- deep-researchSkill
- deployment-patternsSkill
- error-handlingSkill
- eval-harnessSkill
- git-workflowSkill
- hipaa-complianceSkill
- iterative-retrievalSkill
- product-lensSkill
- prompt-optimizerSkill
- research-opsSkill
- rules-distillSkill
- safety-guardSkill
- search-firstSkill
- security-bounty-hunterSkill
- security-reviewSkill
- security-scanSkill
- hcc-bundleSkill
- token-budget-advisorSkill
- verification-loopSkill
The file
Files
Docker Patterns for Hermes
Production-ready Docker patterns optimized for Hermes Agent workloads.
Prerequisites
- Docker 24+ with BuildKit enabled
- Hermes with
terminal,file,code_executiontoolsets
Core Patterns
1. Multi-Stage Build (Python/Hermes)
# syntax = docker/dockerfile:1.7
# Build stage
FROM python:3.13-slim AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt
# Runtime stage
FROM python:3.13-slim AS runtime
WORKDIR /app
# Non-root user
RUN groupadd -r hermes && useradd -r -g hermes hermes
# Copy only installed packages
COPY --from=builder /root/.local /home/hermes/.local
ENV PATH=/home/hermes/.local/bin:$PATH
# Copy application
COPY --chown=hermes:hermes . .
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import hermes_cli; print('OK')" || exit 1
USER hermes
ENTRYPOINT ["hermes"]
CMD ["gateway", "run"]2. Hermes Gateway Image
# Dockerfile.gateway
FROM nousresearch/hermes-agent:latest AS base
# Add custom skills/plugins
COPY --chown=hermes:hermes skills/ /home/hermes/.hermes/skills/
COPY --chown=hermes:hermes plugins/ /home/hermes/.hermes/plugins/
# Config (non-secrets only)
COPY --chown=hermes:hermes config.yaml /home/hermes/.hermes/config.yaml
# Secrets mounted at runtime via .env or Docker secrets
# docker run --env-file .env.production ...
USER hermes3. Docker Compose for Development
# docker-compose.dev.yml
version: '3.8'
services:
hermes:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/app
- ~/.hermes:/home/hermes/.hermes
- /var/run/docker.sock:/var/run/docker.sock
environment:
- HERMES_HOME=/home/hermes/.hermes
- PYTHONPATH=/app
ports:
- "8080:8080"
command: hermes --dev
profiles: ["dev"]
# Supporting services
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: hermes
POSTGRES_USER: hermes
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
secrets:
- postgres_password
volumes:
- postgres-data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
- redis-data:/data
secrets:
postgres_password:
file: ./secrets/postgres_password.txt
volumes:
postgres-data:
redis-data:4. Production Compose
# docker-compose.prod.yml
version: '3.8'
services:
hermes-gateway:
image: ${REGISTRY}/hermes-gateway:${VERSION}
deploy:
replicas: 3
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.25'
memory: 256M
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
ports:
- "8080:8080"
environment:
- HERMES_HOME=/data/.hermes
volumes:
- hermes-data:/data
secrets:
- hermes_env
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
secrets:
hermes_env:
external: true
volumes:
hermes-data:
external: trueSecurity Hardening
1. Non-Root User (Required)
RUN groupadd -r appuser && useradd -r -g appuser appuser
USER appuser2. Read-Only Root Filesystem
# In compose
services:
hermes:
read_only: true
tmpfs:
- /tmp
- /var/run3. Drop Capabilities
services:
hermes:
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE # Only if binding <1024
security_opt:
- no-new-privileges:true4. Scan Images
# Trivy scan
terminal(command="trivy image --severity HIGH,CRITICAL hermes-gateway:latest")
# Hadolint for Dockerfile
terminal(command="hadolint Dockerfile")Build Optimization
1. Layer Caching
# Copy dependency files first
COPY requirements.txt pyproject.toml ./
RUN pip install --no-cache-dir --user -r requirements.txt
# Then copy source (changes frequently)
COPY . .2. .dockerignore
# .dockerignore
.git
.gitignore
__pycache__
*.pyc
.pytest_cache
.coverage
htmlcov
.tox
.venv
venv
.env
.env.*
!.env.example
*.log
.DS_Store
*.swp
*.swo
.vscode
.idea
*.md
!README.md
docs/
tests/
scripts/3. BuildKit Features
# syntax = docker/dockerfile:1.7
# Cache mount for pip
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --no-cache-dir -r requirements.txtHermes-Specific Patterns
1. Skill/Plugin Mounting
# For development - mount skills for live reload
volumes:
- ./skills:/home/hermes/.hermes/skills:ro
- ./plugins:/home/hermes/.hermes/plugins:ro2. Config Management
# Config as code, secrets at runtime
volumes:
- ./config.yaml:/home/hermes/.hermes/config.yaml:ro
secrets:
- hermes_secrets3. Gateway with Persistent Sessions
services:
hermes-gateway:
volumes:
- hermes-sessions:/home/hermes/.hermes/sessions
- hermes-state:/home/hermes/.hermes/state.dbCommands Quick Reference
| Task | Command |
| Build dev | docker compose -f docker-compose.dev.yml build |
| Run dev | docker compose -f docker-compose.dev.yml up |
| Build prod | docker compose -f docker-compose.prod.yml build |
| Deploy prod | docker compose -f docker-compose.prod.yml up -d |
| View logs | docker compose logs -f hermes-gateway |
| Shell access | docker compose exec hermes-gateway bash |
| Scan image | trivy image hermes-gateway:latest |
| Prune | docker system prune -af |
Skill Composition
deployment-patterns— Full deployment pipelinessecurity-review— Container security scanningcost-aware-llm-pipeline— Optimize LLM API costs in containers
Adapted from ECC docker-patterns for Hermes Agent. Original: affaan-m/ECC
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

