Skip to content

fix(docker): optimize docker contanier image creation - #4034

Merged
benbarclay merged 8 commits into
NousResearch:mainfrom
bcross:docker-optimization
Mar 31, 2026
Merged

fix(docker): optimize docker contanier image creation#4034
benbarclay merged 8 commits into
NousResearch:mainfrom
bcross:docker-optimization

Conversation

@bcross

@bcross bcross commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Optimize Docker image layering and size by combining run commands and removing caches. Ignore more files using .dockerignore to reduce cache busting. Add a tag to the Docker image when a release is created.

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

Bryan Cross and others added 5 commits March 30, 2026 15:19
…gnore

- Combine apt-get update and install into single RUN with cache clearing
- Remove APT lists after installation
- Add --no-cache-dir to pip install
- Add --prefer-offline --no-audit to npm install
- Create .dockerignore to exclude unnecessary files from build context
- Update docker-publish.yml workflow to tag images with release names
- Ensure buildx caching is used (type=gha)
@bcross bcross changed the title feat(docker): optimize docker contanier image creation fix(docker): optimize docker contanier image creation Mar 30, 2026
@bcross
bcross marked this pull request as draft March 30, 2026 20:45
@bcross
bcross marked this pull request as ready for review March 30, 2026 20:58
@bcross

bcross commented Mar 30, 2026

Copy link
Copy Markdown
Contributor Author

@benbarclay, you are mentioned in the PR that created the Dockerfile. I would appreciate any feedback you have on these improvements.

Comment thread .github/workflows/docker-publish.yml
Comment thread Dockerfile
@benbarclay
benbarclay merged commit c36aa5f into NousResearch:main Mar 31, 2026
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
fix(docker): optimize docker contanier image creation
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
fix(docker): optimize docker contanier image creation
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
fix(docker): optimize docker contanier image creation
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
fix(docker): optimize docker contanier image creation
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
fix(docker): optimize docker contanier image creation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants