mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Improve development container configuration
Update container setup to work better with user permissions and development workflow: - Use ubuntu user instead of root for better permission handling - Configure proper npm global directory paths - Update launch script for easier development workflow - Add support for user ID/group ID configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,25 +12,28 @@ ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
|||||||
# Run the installer then remove it
|
# Run the installer then remove it
|
||||||
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
RUN sh /uv-installer.sh && rm /uv-installer.sh
|
||||||
|
|
||||||
# Create user with sudo privileges
|
## set your userid/grupid
|
||||||
#RUN useradd -m -s /bin/bash claude && \
|
#ARG UID=1001
|
||||||
|
#ARG GID=1001
|
||||||
|
#
|
||||||
|
## Create user with sudo privileges
|
||||||
|
#RUN groupadd -g $GID claude && useradd -u $UID -g $GID -m -s /bin/bash claude && \
|
||||||
# echo 'claude ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
# echo 'claude ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||||
|
|
||||||
# Switch to claude user
|
# uid/gid 1000
|
||||||
#USER claude
|
USER ubuntu
|
||||||
WORKDIR /workspace
|
WORKDIR /home/ubuntu/workspace
|
||||||
|
|
||||||
# Configure npm global directory and install Claude Code
|
# Configure npm global directory and install Claude Code
|
||||||
RUN npm config set prefix '/root/.npm-global' && \
|
RUN npm config set prefix '/home/ubuntu/.npm-global' && \
|
||||||
npm install -g @anthropic-ai/claude-code
|
npm install -g @anthropic-ai/claude-code
|
||||||
|
|
||||||
# Add npm global bin to PATH
|
# Add npm global bin to PATH
|
||||||
ENV PATH="/root/.npm-global/bin:$PATH"
|
ENV PATH="/home/ubuntu/.npm-global/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
# Ensure the installed binary is on the `PATH`
|
# Ensure the installed binary is on the `PATH`
|
||||||
ENV PATH="/root/.local/bin/:$PATH"
|
ENV PATH="/home/ubuntu/.local/bin/:$PATH"
|
||||||
|
|
||||||
|
|
||||||
RUN claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project /workspace
|
RUN claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena-mcp-server --context ide-assistant --project /workspace
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# Run this script from <tinyusdz> root.
|
# Run this script from <tinyusdz> root.
|
||||||
|
|
||||||
|
|
||||||
podman run -v `pwd`:/workspace -v $HOME/.claude:/root/.claude -it tinyusdz bash
|
podman run --rm --userns=keep-id -v `pwd`:/home/ubuntu/workspace -v $HOME/.claude.json:/home/ubuntu/.claude.json -v $HOME/.claude:/home/ubuntu/.claude -it tinyusdz claude
|
||||||
|
#podman run --rm -v `pwd`:/home/ubuntu/workspace -v $HOME/.claude.json:/home/ubuntu/.claude.json -v $HOME/.claude:/home/ubuntu/.claude -it tinyusdz bash
|
||||||
|
|||||||
Reference in New Issue
Block a user