Skip to content

chore: Update Dockerfile to optimize build process and configure Clau…#52

Open
yodem wants to merge 5 commits intomainfrom
fix/chatbot-fs
Open

chore: Update Dockerfile to optimize build process and configure Clau…#52
yodem wants to merge 5 commits intomainfrom
fix/chatbot-fs

Conversation

@yodem
Copy link
Contributor

@yodem yodem commented Feb 25, 2026

…de Code CLI settings

@coolify-sefaria-github
Copy link

coolify-sefaria-github bot commented Feb 25, 2026

The preview deployment for sefaria/ai-chatbot:client is ready. 🟢

Open Preview | Open Build Logs | Open Application Logs

Last updated at: 2026-02-25 11:47:44 CET

@yodem yodem requested review from Copilot and removed request for BrendanGalloway February 25, 2026 10:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request optimizes the Docker build process and configures the Claude Code CLI with system-level and user-level settings. The changes improve build caching efficiency and ensure the Claude Code CLI has proper configuration directories when the container runs.

Changes:

  • Optimized Docker layer caching by copying package.json and package-lock.json separately before other files and switching from npm install to npm ci for reproducible builds
  • Pinned @anthropic-ai/claude-code to version 2.1.56 for reproducible builds
  • Created system-level and user-level Claude Code CLI configuration directories with empty JSON settings files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

yodem and others added 2 commits February 25, 2026 12:41
Files created under /home/appuser/ in the image are invisible at runtime
since the deployment mounts an emptyDir over the entire home directory.
remote-settings.json is now created by the claude-settings init container.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two changes to fix the hundreds of ENOENT errors on remote-settings.json:

1. Downgrade @anthropic-ai/claude-code from 2.1.37 to 2.1.37 (version
   before the problematic directory-wiping behavior was introduced)
2. Add entrypoint wrapper that runs `claude --version` before gunicorn
   starts, triggering CLI first-run initialization once per pod lifecycle
   so all ~/.claude/ files exist before the first request arrives

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Removed the entrypoint script that pre-warmed the Claude CLI, directly invoking gunicorn instead. This change streamlines the Dockerfile and eliminates unnecessary complexity while maintaining application startup functionality.
…LI settings

Added a command to set read permissions for the managed settings directory, allowing the non-root user to access the configuration files. This change enhances the security and functionality of the Docker image.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants