Skip to content

Conversation

Code42Cate
Copy link
Contributor

Adds Docker containerization with multi-stage build using a distroless base image.

Also added it to server.json, not 100% if this is correct or how the release project here works. Would be great if this is automatically released to DockerHub. If you want any help with that lmk, happy to follow up with another PR or add it to this one.

I also moved @smithery/cli and playwright-core (only used for types) to devDependencies because it was bloating the Docker Image

Tested locally with Claude Desktop.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Summary

This PR successfully adds Docker containerization support using a multi-stage build pattern with a distroless Node.js base image for enhanced security and minimal size.

Key Changes:

  • Multi-stage Dockerfile with builder and production stages
  • Moved @smithery/cli and playwright-core to devDependencies (only used for types and tooling)
  • Added Docker OCI registry configuration to server.json
  • Comprehensive documentation in README with Docker setup and usage examples
  • Proper .dockerignore to exclude unnecessary files from build context

Issue Found:

  • Version mismatch: server.json uses 2.1.1 while package.json is at 2.1.2

Confidence Score: 4/5

  • Safe to merge after fixing the version mismatch in server.json
  • Docker implementation is solid with best practices (multi-stage build, distroless base, proper dependency optimization). Only issue is the version mismatch which should be corrected before merge to ensure consistency across registry configurations.
  • server.json needs version update to match package.json (2.1.2)

Important Files Changed

File Analysis

Filename Score Overview
Dockerfile 5/5 Multi-stage Docker build with distroless base image for minimal attack surface and size
package.json 5/5 Moved @smithery/cli and playwright-core to devDependencies to reduce production image size
server.json 4/5 Added Docker OCI registry configuration, but version is outdated (2.1.1 vs current 2.1.2)
README.md 5/5 Added comprehensive Docker installation and usage instructions with configuration examples

Sequence Diagram

sequenceDiagram
    participant User
    participant Docker
    participant Container
    participant MCPServer
    participant Browserbase

    User->>Docker: docker run with env vars
    Docker->>Container: Start Node.js distroless container
    Container->>Container: Load cli.js entry point
    Container->>MCPServer: Initialize MCP server via STDIO
    MCPServer->>MCPServer: Load config from env vars
    User->>MCPServer: Send MCP request via STDIO
    MCPServer->>Browserbase: Create browser session
    Browserbase-->>MCPServer: Session response
    MCPServer-->>User: Return result via STDIO
    User->>Docker: Container shutdown
    Docker->>Container: Cleanup (--rm flag)
Loading

5 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@Kylejeong2 Kylejeong2 merged commit 63b14b0 into browserbase:main Oct 13, 2025
1 check failed
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