This is an automated email from the ASF dual-hosted git repository. mgubaidullin pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
commit 94991fc96739f50a69e372eed73f6266456b6548 Author: Marat Gubaidullin <[email protected]> AuthorDate: Fri Aug 28 09:05:31 2026 -0400 clause fixes --- Dockerfile.claude | 50 ++++++++++++++++++++++++++++---------------------- claude_vscode.sh | 10 +++++----- claude_webapp.sh | 10 +++++----- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/Dockerfile.claude b/Dockerfile.claude index 3f7631fd..83cd2294 100644 --- a/Dockerfile.claude +++ b/Dockerfile.claude @@ -1,29 +1,35 @@ -FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:1.24 - -# The UBI runtime image defaults to a non-root user. -# We switch to root to install dependencies and give Claude full execution rights in the sandbox. -USER root - -# 1. Update existing packages -RUN microdnf update -y - -# 2. Install packages one by one to find the culprit -RUN microdnf install -y nodejs -RUN microdnf install -y npm -RUN microdnf install -y git -RUN microdnf install -y python3 -RUN microdnf install -y jq -RUN microdnf install -y gcc -RUN microdnf install -y tar -RUN microdnf install -y make - -# 3. Clean up -RUN microdnf clean all +FROM maven:3.9-eclipse-temurin-25 + +RUN apt-get update && apt-get install -y \ + nodejs \ + npm \ + git \ + python3 \ + python3-yaml \ + jq \ + gcc \ + tar \ + make \ + curl \ + # Clean up apt cache to keep the image small + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Install the latest stable kubectl +RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ + && chmod +x kubectl \ + && mv kubectl /usr/local/bin/ # Install Claude Code globally RUN npm install -g @anthropic-ai/claude-code -WORKDIR /karavan +# Create the non-root 'default' user +RUN useradd -m -s /bin/bash default + +WORKDIR /app + +# Ensure the new user has ownership of the working directory +RUN chown -R default:default /app USER default diff --git a/claude_vscode.sh b/claude_vscode.sh index d61f949d..5f933568 100755 --- a/claude_vscode.sh +++ b/claude_vscode.sh @@ -2,12 +2,12 @@ docker run -it --rm \ --name claude-sandbox \ - -v "$(pwd)/docs:/karavan/docs" \ - -v "$(pwd)/karavan-vscode:/karavan/karavan-vscode" \ - -v "$(pwd)/.github/workflow/vscode.yml:/karavan/.github/workflow/vscode.yml" \ - -v "$(pwd)/.git:/karavan/.git:ro" \ + -v "$(pwd)/docs:/app/docs" \ + -v "$(pwd)/karavan-vscode:/app/karavan-vscode" \ + -v "$(pwd)/.github/workflow/vscode.yml:/app/.github/workflow/vscode.yml" \ + -v "$(pwd)/.git:/app/.git:ro" \ -v claude-config:/home/default \ -e ANTHROPIC_API_KEY \ claude-sandbox \ --dangerously-skip-permissions \ - "Read /karavan/karavan-vscode/.task.md. Execute the tasks described within, make the necessary code changes, and generate a concise summary report saved to /karavan/karavan-vscode/.task_report.md. Exit the process when you are completely finished." \ No newline at end of file + "Read /app/karavan-vscode/.task.md. Execute the tasks described within, make the necessary code changes, and generate a concise summary report saved to /app/karavan-vscode/.task_report.md. Exit the process when you are completely finished." \ No newline at end of file diff --git a/claude_webapp.sh b/claude_webapp.sh index 18af40d1..d0708e13 100755 --- a/claude_webapp.sh +++ b/claude_webapp.sh @@ -2,12 +2,12 @@ docker run -it --rm --network=karavan \ --name claude-sandbox \ - -v "$(pwd)/docs:/karavan/docs" \ - -v "$(pwd)/karavan-app:/karavan/karavan-app" \ - -v "$(pwd)/karavan-generator:/karavan/karavan-generator" \ - -v "$(pwd)/.git:/karavan/.git:ro" \ + -v "$(pwd)/docs:/app/docs" \ + -v "$(pwd)/karavan-app:/app/karavan-app" \ + -v "$(pwd)/karavan-generator:/app/karavan-generator" \ + -v "$(pwd)/.git:/app/.git:ro" \ -v claude-config:/home/default \ -e ANTHROPIC_API_KEY \ claude-sandbox \ --dangerously-skip-permissions \ - "Read /karavan/karavan-app/.task.md. Execute the tasks described within, make the necessary code changes, and generate a concise summary report saved to /karavan/karavan-app/.task_report.md. Exit the process when you are completely finished." \ No newline at end of file + "Read /app/karavan-app/.task.md. Execute the tasks described within, make the necessary code changes, and generate a concise summary report saved to /app/karavan-app/.task_report.md. Exit the process when you are completely finished." \ No newline at end of file
