feat: tsx
This commit is contained in:
parent
63817a52e8
commit
842f23b762
16
Dockerfile
16
Dockerfile
@ -1,6 +1,3 @@
|
|||||||
# ABOUTME: Docker image for Claude Code with Twilio MCP server
|
|
||||||
# ABOUTME: Provides autonomous Claude Code environment with SMS notifications
|
|
||||||
|
|
||||||
FROM node:20-slim
|
FROM node:20-slim
|
||||||
|
|
||||||
# Install required system dependencies
|
# Install required system dependencies
|
||||||
@ -26,15 +23,18 @@ fi
|
|||||||
# Create a non-root user with matching host UID/GID
|
# Create a non-root user with matching host UID/GID
|
||||||
ARG USER_UID=1000
|
ARG USER_UID=1000
|
||||||
ARG USER_GID=1000
|
ARG USER_GID=1000
|
||||||
RUN groupadd -g $USER_GID claude-user && \
|
RUN addgroup --gid $USER_GID claude-user || true && \
|
||||||
useradd -m -s /bin/bash -u $USER_UID -g $USER_GID claude-user && \
|
adduser --disabled-password --gecos '' --uid $USER_UID --gid $USER_GID claude-user && \
|
||||||
echo "claude-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
echo "claude-user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
|
echo "User created:" && id claude-user && groups claude-user
|
||||||
|
|
||||||
# Create app directory
|
# Create app directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install Claude Code globally
|
# Install Claude Code globally
|
||||||
RUN npm install -g @anthropic-ai/claude-code
|
RUN npm install -g @anthropic-ai/claude-code
|
||||||
|
RUN npm install -g tsx
|
||||||
|
RUN npm install -g nrm
|
||||||
|
|
||||||
# Ensure npm global bin is in PATH
|
# Ensure npm global bin is in PATH
|
||||||
ENV PATH="/usr/local/bin:${PATH}"
|
ENV PATH="/usr/local/bin:${PATH}"
|
||||||
@ -64,7 +64,8 @@ RUN cp /tmp/.claude.json /home/claude-user/.claude.json && \
|
|||||||
rm -rf /tmp/.claude*
|
rm -rf /tmp/.claude*
|
||||||
|
|
||||||
# Set proper ownership for everything
|
# Set proper ownership for everything
|
||||||
RUN chown -R claude-user:claude-user /app /home/claude-user
|
RUN chown -R claude-user:claude-user /app /home/claude-user || \
|
||||||
|
chown -R $(id -u claude-user):$(id -g claude-user) /app /home/claude-user
|
||||||
|
|
||||||
# Switch to non-root user
|
# Switch to non-root user
|
||||||
USER claude-user
|
USER claude-user
|
||||||
@ -82,6 +83,7 @@ RUN bash -c 'source /app/.env && \
|
|||||||
echo "No Twilio credentials found, skipping MCP configuration"; \
|
echo "No Twilio credentials found, skipping MCP configuration"; \
|
||||||
fi'
|
fi'
|
||||||
|
|
||||||
|
|
||||||
# Configure git user during build using host git config passed as build args
|
# Configure git user during build using host git config passed as build args
|
||||||
ARG GIT_USER_NAME=""
|
ARG GIT_USER_NAME=""
|
||||||
ARG GIT_USER_EMAIL=""
|
ARG GIT_USER_EMAIL=""
|
||||||
|
Loading…
Reference in New Issue
Block a user