Skip to content

Instantly share code, notes, and snippets.

@sulrich
Last active July 3, 2025 16:03
Show Gist options
  • Save sulrich/d0d3303de162e6d72e52c8cc69e16665 to your computer and use it in GitHub Desktop.
Save sulrich/d0d3303de162e6d72e52c8cc69e16665 to your computer and use it in GitHub Desktop.
put claude code in a sandbox
# is there a lighter container that fits the bill here?
FROM python:3.11-slim
RUN useradd -m claude
RUN apt-get update && \
apt-get install -y nodejs npm && \
rm -rf /var/lib/apt/lists/*
RUN npm install -g @anthropic-ai/claude-code
WORKDIR /app
RUN chown -R claude:claude /app
USER claude
# default command to run on start
CMD ["/bin/bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment