dockerfile fix
This commit is contained in:
@@ -17,12 +17,6 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
|
||||
# Install UV package manager globally
|
||||
RUN pip install --no-cache-dir uv
|
||||
|
||||
# Switch to vscode user for npm global installs to avoid permission conflicts
|
||||
# USER vscode
|
||||
|
||||
# # Install global npm packages as vscode user
|
||||
# RUN npm install -g task-master-ai repomix @anthropic-ai/claude-code
|
||||
|
||||
# Switch back to root for remaining setup
|
||||
USER root
|
||||
|
||||
@@ -41,29 +35,29 @@ WORKDIR /workspace
|
||||
|
||||
# Create a startup script to fix permissions on volumes and ensure group membership
|
||||
RUN echo '#!/bin/bash\n\
|
||||
# Fix ownership of workspace directories\n\
|
||||
if [ -d "/workspace/.venv" ]; then\n\
|
||||
# Fix ownership of workspace directories\n\
|
||||
if [ -d "/workspace/.venv" ]; then\n\
|
||||
sudo chown -R vscode:vscode /workspace/.venv\n\
|
||||
fi\n\
|
||||
# Ensure vscode user is in root group for shared permissions\n\
|
||||
if ! groups vscode | grep -q "\broot\b"; then\n\
|
||||
fi\n\
|
||||
# Ensure vscode user is in root group for shared permissions\n\
|
||||
if ! groups vscode | grep -q "\broot\b"; then\n\
|
||||
sudo usermod -a -G root vscode\n\
|
||||
fi\n\
|
||||
# Fix permissions on config and cache directories if they exist\n\
|
||||
if [ -d "/home/vscode/.config" ]; then\n\
|
||||
fi\n\
|
||||
# Fix permissions on config and cache directories if they exist\n\
|
||||
if [ -d "/home/vscode/.config" ]; then\n\
|
||||
sudo chown -R vscode:vscode /home/vscode/.config 2>/dev/null || true\n\
|
||||
fi\n\
|
||||
if [ -d "/home/vscode/.cache" ]; then\n\
|
||||
fi\n\
|
||||
if [ -d "/home/vscode/.cache" ]; then\n\
|
||||
sudo chown -R vscode:vscode /home/vscode/.cache 2>/dev/null || true\n\
|
||||
fi\n\
|
||||
# Fix permissions on Claude directory if it exists\n\
|
||||
if [ -d "/home/vscode/.claude" ]; then\n\
|
||||
fi\n\
|
||||
# Fix permissions on Claude directory if it exists\n\
|
||||
if [ -d "/home/vscode/.claude" ]; then\n\
|
||||
sudo chown -R vscode:vscode /home/vscode/.claude 2>/dev/null || true\n\
|
||||
# Ensure projects directory exists and has proper permissions\n\
|
||||
mkdir -p /home/vscode/.claude/projects 2>/dev/null || true\n\
|
||||
sudo chown -R vscode:vscode /home/vscode/.claude/projects 2>/dev/null || true\n\
|
||||
fi\n\
|
||||
exec "$@"' > /usr/local/bin/docker-entrypoint.sh \
|
||||
fi\n\
|
||||
exec "$@"' > /usr/local/bin/docker-entrypoint.sh \
|
||||
&& chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user