Fix Twilio MCP integration with baked-in credentials
- Add proper type and env sections to mcp-config.json - Remove dynamic MCP add command, use pre-configured MCP - Bake .env credentials into Docker image at build time - Remove runtime .env volume mount - true one-time setup - Auto-rebuild image when .env file changes - Export Twilio env vars for MCP server subprocess - Remove conflicting .mcp.json file
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -12,8 +12,11 @@ RUN apt-get update && apt-get install -y \
|
||||
sudo \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create a non-root user
|
||||
RUN useradd -m -s /bin/bash claude-user && \
|
||||
# Create a non-root user with matching host UID/GID
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=1000
|
||||
RUN groupadd -g $USER_GID claude-user && \
|
||||
useradd -m -s /bin/bash -u $USER_UID -g $USER_GID claude-user && \
|
||||
echo "claude-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
# Create app directory
|
||||
@@ -38,6 +41,10 @@ COPY config/mcp-config.json /app/config/
|
||||
COPY scripts/startup.sh /app/
|
||||
RUN chmod +x /app/startup.sh
|
||||
|
||||
# Copy .env file during build to bake credentials into the image
|
||||
# This enables one-time setup - no need for .env in project directories
|
||||
COPY .env /app/.env
|
||||
|
||||
# Set proper ownership
|
||||
RUN chown -R claude-user:claude-user /app /home/claude-user
|
||||
|
||||
|
Reference in New Issue
Block a user