Skip to content

Instantly share code, notes, and snippets.

View karthiks's full-sized avatar
🎯
Focusing

Karthik Sirasanagandla karthiks

🎯
Focusing
View GitHub Profile
@karthiks
karthiks / Docker.jdtls
Created April 19, 2026 06:35
Reference Implementation - Minimal one to install JDTLS in Docker container
# Use official Maven image with JDK 21
FROM maven:3.9.6-eclipse-temurin-21
# Install dependencies for JDTLS (Python is required for the wrapper script)
RUN apt-get update && apt-get install -y \
python3 \
wget \
tar \
&& rm -rf /var/lib/apt/lists/*
@karthiks
karthiks / Dockerfile.melchizedek.claude
Created April 18, 2026 08:28
Reference Implementation - Melchizedek as Persistent Memory
# Stage 1: "Borrow" the binaries from official images
FROM maven:3.9.6-eclipse-temurin-21-jammy AS maven_source
FROM eclipse-temurin:21-jdk-jammy AS java_source
# Stage 2: Final Development Image
FROM node:20-slim
# 1. Install critical system dependencies (optimized)
RUN apt-get update && apt-get install -y --no-install-recommends \
bash curl git vim jq ca-certificates \
@karthiks
karthiks / docker-compose.bitfrost.yml
Created April 18, 2026 05:56
Reference docker-compose file leveraging Bitfrost AI Gateway as service dependency for Claude Code dev container
# Build the image
# Ref.: https://openrouter.ai/docs/guides/coding-agents/claude-code-integration
# Bash: export ANTHROPIC_BASE_URL="http://bifrost:8080/anthropic" ANTHROPIC_API_KEY="" ANTHROPIC_AUTH_TOKEN="your-api-key-here"
# PowerShell: $env:ANTHROPIC_BASE_URL="http://bifrost:8080/anthropic"; $env:ANTHROPIC_API_KEY=""; $env:ANTHROPIC_AUTH_TOKEN="your-api-key-here"
# docker compose build
# Launch the environment
# The --rm flag ensures that once you type exit, the container instance is removed, keeping your Docker environment tidy.
# docker compose run --rm claude-dhanj
@karthiks
karthiks / docker-compose.ccr.yml
Created April 17, 2026 07:51
Sample docker-compose file to host ClaudeCodeRouter as a service upon which ClaudeCode depends upon
# Build the image
# docker compose build -e CC_API_KEY=""
# Launch the environment
# The --rm flag ensures that once you type exit, the container instance is removed, keeping your Docker environment tidy.
# docker compose run --rm claude-dhanj
# Consistency: If you run docker ps, you'll see claude-dhanj. If you run docker images, you'll see claude-dhanj.
# Volume Sync: Since your volume is mapped to ${PWD}, any code changes made by the Claude Code CLI inside the container will instantly appear on your host machine.
# Memory Safety: The deploy block ensures that even if a Maven build or a heavy Node process spikes, it stays within your defined 8GB limit.
@karthiks
karthiks / ccr-config-template.json
Created April 17, 2026 07:46
Template of config.json for Claude Code Router
{
"HOST": "0.0.0.0",
"PORT": 3456,
"APIKEY": "apikey-ccr",
"LOG": true,
"LOG_LEVEL": "info",
"Providers": [
{
"NAME": "groq",
"HOST": "https://api.groq.com/openai/v1/chat/completions",
@karthiks
karthiks / Dockerfile.ccr.claude
Last active April 17, 2026 15:14
Dockerfile - Config Claude Code in Docker container to connect to CCR AI Gateway
FROM node:20-bookworm-slim
# 1. Install System Deps
RUN apt-get update && apt-get install -y --no-install-recommends \
bash curl git vim jq ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 2. Workspace Setup (Still root)
WORKDIR /workspace
@karthiks
karthiks / Dockerfile.ollama.claude
Created April 17, 2026 06:42
Reference implementation to showcase connecting to Ollama service on Windows host from Docker container
FROM node:20-slim
# 1. Install essential system tools (curl for testing, git for Claude)
RUN apt-get update && apt-get install -y --no-install-recommends \
bash curl git vim sudo ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# 2. Install Claude Code globally via npm
# Using npm here ensures a non-interactive, reliable build.
# Warning: Installing CC via npm is bloat. Should install natively via bash script for lean installation.
@karthiks
karthiks / Dockerfile.ccagent.zsh
Created April 16, 2026 17:20
Dockerfile - Zsh as default prompt and renaming existing user from base image
# Objective: Zsh as default prompt and renaming existing user from base image
# Build:
# docker build -f Dockerfile.ccagent.zsh -t node-custom-user .
# Run n Verify:
# docker run -it --rm node-custom-user whoami
FROM node:20-bookworm-slim
# Build arguments for user configuration
# On Windows with Docker Desktop (especially using WSL2 backend), file permissions are mapped based on UID/GIDs.
@karthiks
karthiks / Dockerfile.zsh
Created April 16, 2026 16:39
Replace bash with zsh in Docker Container
# Objective: Replace bash with zsh in Docker Container
# Build:
# docker build -f Dockerfile.zsh -t zsh-ed .
# Run n Verify:
# docker run -it --rm zsh-ed whoami
FROM node:20-bookworm-slim
# node is built-in user that comes with the image - node:20-bookworm-slim.
ARG USERNAME=node
@karthiks
karthiks / Dockerfile
Created April 16, 2026 15:38
Minimal Dockerfile to test renaming existing user in OS base image in Docker.
# Objective: Dockerfile to test renaming existing user in OS base image whose USER_UID=1000, in Docker.
# Build:
# docker build -f Dockerfile -t node-custom-user .
# Run n Verify:
# docker run -it --rm node-custom-user whoami
FROM node:20-bookworm-slim
# Build arguments for user configuration
# On Windows with Docker Desktop (especially using WSL2 backend), file permissions are mapped based on UID/GIDs.