-
Notifications
You must be signed in to change notification settings - Fork 42
Add comprehensive Docker support for containerized Wassette deployments #369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 comprehensive Docker support for containerized Wassette deployments, providing enhanced security isolation through defense-in-depth architecture. The implementation includes multiple Dockerfile variants, production-ready configuration examples, and extensive documentation following Docker security best practices.
- Containerizes Wassette with proper security hardening (non-root user, resource limits, capability dropping)
- Provides comprehensive documentation covering quick start, component mounting, secrets management, and production deployment
- Includes Docker Compose configuration for orchestrated deployments with security defaults
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
docs/deployment/docker.md |
Comprehensive Docker deployment guide with security best practices and troubleshooting |
docs/SUMMARY.md |
Adds Docker documentation to the book structure under new "Deployment" section |
docker-compose.example.yml |
Production-ready Docker Compose configuration with security defaults and resource limits |
README.md |
Updates main readme with Docker installation method and quick start examples |
Dockerfile.prebuilt |
Alternative Dockerfile for using pre-built binaries to speed up container builds |
Dockerfile |
Multi-stage Dockerfile that compiles from source with security hardening |
CHANGELOG.md |
Documents the Docker support addition in the unreleased section |
.dockerignore |
Optimizes Docker build context by excluding unnecessary files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
docs/deployment/docker.md
Outdated
|
||
### Run with HTTP/SSE Transport | ||
|
||
**Note**: The current version of Wassette binds to `127.0.0.1:9001`, which doesn't work directly with Docker port forwarding. The stdio transport is recommended for Docker deployments. HTTP/SSE support for Docker will be improved in a future release. |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note about HTTP/SSE binding limitations should include a brief explanation of why 127.0.0.1
binding doesn't work with Docker port forwarding. Consider adding that 127.0.0.1
only accepts connections from localhost within the container, not from the host.
**Note**: The current version of Wassette binds to `127.0.0.1:9001`, which doesn't work directly with Docker port forwarding. The stdio transport is recommended for Docker deployments. HTTP/SSE support for Docker will be improved in a future release. | |
**Note**: The current version of Wassette binds to `127.0.0.1:9001`, which doesn't work directly with Docker port forwarding because `127.0.0.1` only accepts connections from localhost *within the container*, not from the host. As a result, published ports are not accessible from outside the container. The stdio transport is recommended for Docker deployments. HTTP/SSE support for Docker will be improved in a future release. |
Copilot uses AI. Check for mistakes.
wassette: | ||
# ... other config ... | ||
healthcheck: | ||
test: ["CMD", "curl", "-f", "http://localhost:9001/health"] |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The health check endpoint /health
is referenced but it's unclear if this endpoint actually exists in Wassette. Either verify this endpoint exists or provide the correct health check endpoint.
test: ["CMD", "curl", "-f", "http://localhost:9001/health"] | |
test: ["CMD", "curl", "-f", "http://localhost:9001/"] |
Copilot uses AI. Check for mistakes.
|
||
# Optional: Health check for SSE/HTTP transports | ||
healthcheck: | ||
test: ["CMD-SHELL", "curl -f http://localhost:9001/health || exit 1"] |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent health check format between the Docker Compose example and documentation. The documentation uses CMD
format while this uses CMD-SHELL
. Also, the /health
endpoint should be verified to exist.
test: ["CMD-SHELL", "curl -f http://localhost:9001/health || exit 1"] | |
test: ["CMD", "curl", "-f", "http://localhost:9001/health"] |
Copilot uses AI. Check for mistakes.
|
||
# Download and install Wassette binary | ||
ARG WASSETTE_VERSION=latest | ||
RUN curl -fsSL https://github.com/microsoft/wassette/releases/download/${WASSETTE_VERSION}/wassette-linux-x86_64 -o /usr/local/bin/wassette && \ |
Copilot
AI
Oct 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The download URL pattern uses wassette-linux-x86_64
but it should be verified that this matches the actual release asset naming convention. GitHub releases might use different naming patterns.
RUN curl -fsSL https://github.com/microsoft/wassette/releases/download/${WASSETTE_VERSION}/wassette-linux-x86_64 -o /usr/local/bin/wassette && \ | |
# NOTE: The asset name may change between releases. Check the actual asset name at: | |
# https://github.com/microsoft/wassette/releases/tag/${WASSETTE_VERSION} | |
ARG WASSETTE_ASSET=wassette-linux-x86_64 | |
RUN curl -fsSL https://github.com/microsoft/wassette/releases/download/${WASSETTE_VERSION}/${WASSETTE_ASSET} -o /usr/local/bin/wassette && \ |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/SUMMARY.md
Outdated
# Deployment | ||
|
||
- [Docker](./deployment/docker.md) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could merge the docs with quick started
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 2367c8e. Moved Docker documentation under the Installation section as a sub-item, removing the separate Deployment section.
Dockerfile
Outdated
# This Dockerfile provides a containerized runtime for Wassette with additional security isolation | ||
|
||
# Stage 1: Build the Wassette binary | ||
FROM rust:1.83-bookworm AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use rust 1.90 version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to Rust 1.90 in 2367c8e to match the project's Rust version.
Dockerfile
Outdated
# Default command: start Wassette with stdio transport | ||
# Override this in docker run or docker-compose for different transports | ||
CMD ["wassette", "serve", "--stdio"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default start with streamable-http
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed default to streamable-http in 2367c8e.
Dockerfile.prebuilt
Outdated
# Default command: start Wassette with stdio transport | ||
# Override this in docker run or docker-compose for different transports | ||
CMD ["wassette", "serve", "--stdio"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed default to streamable-http in 2367c8e.
@copilot apply changes based on the comments in this thread |
All the comments from that review thread have already been addressed in commit 2367c8e:
Are there additional changes you'd like me to make? |
@copilot apply changes based on the comments in this thread |
Completed in 88ea633. Updated all documentation to reflect streamable-http as the default transport:
|
Co-authored-by: Mossaka <[email protected]>
Co-authored-by: Mossaka <[email protected]>
Co-authored-by: Mossaka <[email protected]>
…e Docker docs with Installation Co-authored-by: Mossaka <[email protected]>
…nsport Co-authored-by: Mossaka <[email protected]>
88ea633
to
a3e3208
Compare
Signed-off-by: Jiaxiao Zhou <[email protected]>
Changes from Review Feedback (Commits 2367c8e and latest)
All review comments have been fully addressed:
rust:1.83
torust:1.90
to match project Rust version--streamable-http
instead of--stdio
-p 9001:9001
for port mapping (streamable-http default)--stdio
or--sse
when neededThe documentation now consistently shows streamable-http as the default with proper port mapping, making it easier for users to get started with HTTP-based access.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.