Skip to content

Conversation

@abubnalitic-nbl
Copy link
Contributor

Adds Docker support for containerized deployment of the NetBox MCP Server, focused on mainline MCP use cases.
Key Features:

  • Single, focused Dockerfile for MCP clients
  • Multi-stage Alpine build (140MB final)
  • Security best practices (non-root user)
  • Build optimization (cache mounts)
  • Full configuration system integration

Architectural Decision:
This PR includes only the standard Dockerfile. MCPO integration for OpenWebUI is not bundled, keeping the repo focused on NetBox MCP implementation rather than protocol translation layers.

Attribution

Based on the excellent multi-stage Alpine Dockerfile from PR #26 by @mhajder. Thank you for the quality work and contribution!

Related:
Supersedes #26 with focused scope on standard MCP use cases.

Closes #26

abubnalitic-nbl and others added 2 commits October 24, 2025 18:25
Add single Dockerfile for containerized deployment of NetBox MCP server.
Focused on mainline MCP use cases (Claude Desktop, Claude Code, MCP-aware clients).

Docker Image Details:
- Multi-stage Alpine-based build (140MB final size)
- Non-root user (appuser:1000) for security
- Build cache optimization via mount directives
- EXPOSE 8000 directive for documentation
- Follows Docker conventions (trailing newlines, .dockerignore)

Configuration:
- All settings via environment variables
- Supports HTTP transport (required for Docker)
- Full configuration system integration
- Examples in README for common scenarios

OpenWebUI Integration:
- Documented approach using standalone mcpo wrapper
- Keeps repo focused on core MCP implementation
- Users can extend with protocol translators as needed

Architectural Decision:
- Dockerfile.mcpo intentionally not included
- MCPO is a generic MCP→OpenAPI translator
- Not NetBox-specific, better as separate tool
- Documentation provided for users who need it

Testing:
- Image builds successfully (140MB)
- EXPOSE 8000 verified
- Non-root user confirmed
- HTTP transport tested

Based on excellent work in PR #26 by @mhajder
- Adopted multi-stage Alpine build pattern
- Security practices (non-root, minimal deps)
- Build optimization techniques

Co-authored-by: Mateusz Hajder <6783135+mhajder@users.noreply.github.com>
Co-authored-by: Anton Bubna-Litic <abubnalitic@netboxlabs.com>
@abubnalitic-nbl abubnalitic-nbl self-assigned this Oct 27, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Docker support for containerized deployment of the NetBox MCP Server with a focus on standard MCP use cases. It provides a production-ready, security-hardened Docker image built using multi-stage Alpine builds.

Key Changes:

  • Multi-stage Dockerfile optimized for size (140MB) and security with non-root user
  • Comprehensive Docker usage documentation with examples for various scenarios
  • Docker ignore file to optimize build context

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Dockerfile Multi-stage Alpine-based build with security best practices (non-root user, minimal image)
.dockerignore Excludes unnecessary files from Docker build context for faster builds
README.md Adds Docker usage section with deployment examples and configuration guidance

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@abubnalitic-nbl abubnalitic-nbl merged commit 3a3f6f9 into main Oct 27, 2025
2 checks passed
@abubnalitic-nbl abubnalitic-nbl deleted the feat/docker-standard-only branch October 27, 2025 18:55
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.

3 participants