Claude / Dockerfile
Cnass's picture
Claude Opus 5.5
Pixel art: pixel-art-fixer, WFC, 47'lik autotile, kural kitabi ve Lospec paletleri
c8a6842
Raw History Blame Contribute Delete
8.37 kB
FROM node:22-trixie-slim
ENV DEBIAN_FRONTEND=noninteractive
# git/tmux: terminal + persistence backbone. python3/pip+uv: MCP sunuculari icin (uvx).
# build-essential: node-pty gibi native modulleri derlemek icin. ripgrep: Claude Code arama araci.
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
tmux \
python3 \
python3-pip \
curl \
ca-certificates \
build-essential \
ripgrep \
openssh-client \
procps \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir --break-system-packages uv
# pixel_fix (vendor/pixelfixer, Retro Diffusion pixel-art-fixer) ve pixelkit.py icin.
# Sistem genelinde kurulu: bucket'taki --user kopyalarindan cok daha hizli yuklenir
# (pixel_fix once `python3 -s` ile bunlari dener).
RUN pip3 install --no-cache-dir --break-system-packages \
numpy==2.5.4 scipy==1.18.1 opencv-python-headless==5.0.0.93 pillow==13.0.0
# GitHub CLI (gh): PR/issue islemleri ve `gh auth login` (telefonda tek
# seferlik kodla giris). GitHub MCP ve git de bu girisi kullanir
# (scripts/github-mcp-headers, scripts/git-credential-github).
RUN mkdir -p -m 755 /etc/apt/keyrings \
&& curl -fsSL -o /etc/apt/keyrings/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg \
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends gh \
&& rm -rf /var/lib/apt/lists/*
# rtk: gurultulu Bash komutlarinin (kurulum, derleme, test, lint) ciktisini
# Claude okumadan once kisaltir; scripts/setup-rtk.js hook'unu ve bilgi
# kaybetmeyen ayarlarini yazar. Tek statik ikili; surum ve SHA-256 sabit
# (surum yukseltilirken ikisi birlikte degistirilir: release'in checksums.txt'i).
ARG RTK_VERSION=v0.49.0
ARG RTK_SHA256=7278231dfd7e6a730a4ab7f847b195bcf02289c2d57622b0dab75a6411100c8f
RUN set -e; cd /tmp; \
curl -fsSL -o rtk.tar.gz "https://github.com/rtk-ai/rtk/releases/download/${RTK_VERSION}/rtk-x86_64-unknown-linux-musl.tar.gz"; \
echo "${RTK_SHA256} rtk.tar.gz" | sha256sum -c -; \
if tar -tzf rtk.tar.gz | grep -qE '^/|(^|/)\.\.(/|$)'; then echo "rtk arsivinde guvensiz yol" >&2; exit 1; fi; \
mkdir rtk-x; \
tar -xzf rtk.tar.gz -C rtk-x; \
install -m 755 rtk-x/rtk /usr/local/bin/rtk; \
rm -rf rtk-x rtk.tar.gz; \
rtk --version
# Google Chrome: Playwright MCP'nin tarayicisi (/opt/google/chrome/chrome).
# Kurulumu root ister; bu yuzden calisma aninda degil burada kurulur ve her
# konteynerde hazir olur. Noto CJK/emoji fontlari, ekran goruntulerinde
# Japonca/Korece/Cince metinlerin ve emojilerin kutu olarak cikmamasi icin.
RUN curl -fsSL -o /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends /tmp/chrome.deb fonts-noto-cjk fonts-noto-color-emoji \
&& rm -f /tmp/chrome.deb \
&& rm -rf /var/lib/apt/lists/*
# Playwright MCP (tarayici), surumu sabit. scripts/setup-mcp.js onu (ve Agent
# Web'in kendi araclarini, GitHub MCP'yi) tum oturumlar icin tanimlar.
RUN npm install -g @playwright/mcp@0.0.82 && npm cache clean --force
# Terminal sekmesindeki `claude` komutu (giris/login ve elle kullanim icin).
# Sohbet arayuzu ise package.json'daki Agent SDK'nin kendi Claude Code'unu kullanir;
# ikisi de ayni ~/.claude giris bilgisini paylasir. Surum sabit: bozuk bir yeni
# surum Space'i birden bozmasin (yukseltirken bu satiri degistir).
ARG CLAUDE_CODE_VERSION=2.1.306
RUN npm install -g @anthropic-ai/claude-code@${CLAUDE_CODE_VERSION} && npm cache clean --force
# Gemini CLI: Claude arastirma, buyuk dosya ve gorsel/PDF/video analizini ona
# devredebilir (mcp__agentweb__ask_gemini). Giris: Terminal'de `gemini` (Google
# hesabi) ya da GEMINI_API_KEY secret'i.
ARG GEMINI_CLI_VERSION=0.65.0
RUN npm install -g @google/gemini-cli@${GEMINI_CLI_VERSION} && npm cache clean --force
# Antigravity CLI (agy): Google AI Pro/Ultra ve ucretsiz bireysel hesaplar
# 18.06.2026'dan beri Gemini CLI'ye Google ile giremiyor; abonelik agy ile
# kullanilir. Sohbetin Gemini motoru agy varsa ve giris yapilmissa onu kullanir.
# Giris: Terminal'de `agy` (bilgiler ~/.gemini/antigravity-cli, kalici).
# Kurulum betigi ikiliyi SHA-512 ile dogrular.
RUN curl -fsSL https://antigravity.google/cli/install.sh -o /tmp/agy-install.sh \
&& bash /tmp/agy-install.sh --dir /usr/local/bin \
&& rm -f /tmp/agy-install.sh && rm -rf /root/.cache/antigravity \
&& /usr/local/bin/agy --version
# Piper: ucretsiz, cevrimdisi Turkce ses (avatar ve sesli yanitlar icin yedek ses).
# Ses: tr_TR-fahrettin-medium (CC0). Surum ve SHA-256 sabit.
ARG PIPER_VERSION=2023.11.14-2
ARG PIPER_SHA256=a50cb45f355b7af1f6d758c1b360717877ba0a398cc8cbe6d2a7a3a26e225992
ARG PIPER_VOICE_SHA256=39081c47270180e8a0dfac69b07bf329fb6d039fcc1279dbe26c2daf2848b190
ARG PIPER_VOICE_JSON_SHA256=93741b234acc5f123430a0e343f619e01cfda6b1dc0970ee80bce7da22b1a09b
RUN set -e; cd /tmp; \
curl -fsSL -o piper.tgz "https://github.com/rhasspy/piper/releases/download/${PIPER_VERSION}/piper_linux_x86_64.tar.gz"; \
echo "${PIPER_SHA256} piper.tgz" | sha256sum -c -; \
if tar -tzf piper.tgz | grep -qE '^/|(^|/)\.\.(/|$)'; then echo "piper arsivinde guvensiz yol" >&2; exit 1; fi; \
tar -xzf piper.tgz -C /opt; rm -f piper.tgz; \
mkdir -p /opt/piper/voices; \
base="https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/tr/tr_TR/fahrettin/medium/tr_TR-fahrettin-medium"; \
curl -fsSL -o /opt/piper/voices/tr_TR-fahrettin-medium.onnx "${base}.onnx"; \
curl -fsSL -o /opt/piper/voices/tr_TR-fahrettin-medium.onnx.json "${base}.onnx.json"; \
echo "${PIPER_VOICE_SHA256} /opt/piper/voices/tr_TR-fahrettin-medium.onnx" | sha256sum -c -; \
echo "${PIPER_VOICE_JSON_SHA256} /opt/piper/voices/tr_TR-fahrettin-medium.onnx.json" | sha256sum -c -; \
echo "Merhaba" | /opt/piper/piper --model /opt/piper/voices/tr_TR-fahrettin-medium.onnx --output_file /tmp/piper-test.wav; \
rm -f /tmp/piper-test.wav
WORKDIR /app
# package-lock.json test edilmis surumleri sabitler (npm ci birebir onlari kurar).
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY server ./server
COPY public ./public
COPY scripts ./scripts
# Ucuncu taraf pixel art kaynaklari (MIT; ayrinti vendor/README.md).
COPY vendor ./vendor
# Her Claude icin (sohbet ve terminal) yonetilen Claude Code ayarlari, root'a
# ait ve salt okunur: kalicilik notu (CLAUDE.md: MCP sunuculari ve araclar
# /tmp'ye degil HOME'a kurulur) ve /tmp'deki bir MCP sunucusunu kaydetmeyi
# durduran hook (managed-settings.json -> scripts/mcp-tmp-guard).
# profile.d: terminalin login kabugu da ~/.local/bin'i ve npm ayarini alsin.
COPY scripts/claude-managed/ /etc/claude-code/
COPY scripts/agentweb-profile.sh /etc/profile.d/agentweb.sh
# Web arayuzunden yuklenen dosyalarda calistirma izni kaybolabilir; burada verilir.
# agentweb-install / agentweb-mcp-run her kabukta ve her Claude'da PATH'te olsun.
RUN chmod +x scripts/entrypoint.sh scripts/agentweb-mcp.js \
scripts/github-mcp-headers scripts/git-credential-github scripts/git-credential-huggingface \
scripts/mcp-tmp-guard scripts/mcp-tmp-guard.js \
scripts/agentweb-install.js scripts/agentweb-boot.js scripts/agentweb-record-hook scripts/agentweb-mcp-run \
&& ln -sf /app/scripts/agentweb-install.js /usr/local/bin/agentweb-install \
&& ln -sf /app/scripts/agentweb-mcp-run /usr/local/bin/agentweb-mcp-run \
&& chmod 644 /etc/claude-code/CLAUDE.md /etc/claude-code/managed-settings.json /etc/profile.d/agentweb.sh
RUN mkdir -p /home/node/workspace /home/node/.agentweb-local \
&& chown -R node:node /app /home/node
USER node
ENV HOME=/home/node
ENV PATH="/home/node/.local/bin:${PATH}"
# rtk hicbir zaman kullanim verisi gondermesin.
ENV RTK_TELEMETRY_DISABLED=1
EXPOSE 7860
HEALTHCHECK --interval=60s --timeout=5s --start-period=60s --retries=3 \
CMD curl -fsS http://127.0.0.1:7860/healthz >/dev/null || exit 1
ENTRYPOINT ["/app/scripts/entrypoint.sh"]