Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
add_image "ralphex-fe" \
"ralphex-fe" \
"ralphex-fe/Dockerfile" \
"bun --version && hugo version && /srv/ralphex --version"
"bun --version && hugo version && /srv/ralphex --version && rtk --version"
fi

if [ "$INCLUDES" = "[]" ]; then
Expand Down
17 changes: 17 additions & 0 deletions ralphex-fe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ RUN set -eux; \
fi; \
tar -xzf hugo.tar.gz -C /usr/local/bin/ hugo

# ── RTK (token-optimized CLI proxy for Claude Code) ─────────────────────────
# Pattern from: .devcontainer/Dockerfile
FROM alpine:3.21 AS rtk-download
RUN apk add --no-cache curl jq
RUN set -eux; \
ARCH="$(uname -m)"; \
case "$ARCH" in \
x86_64) RTK_TARGET="x86_64-unknown-linux-musl" ;; \
aarch64) RTK_TARGET="aarch64-unknown-linux-gnu" ;; \
esac; \
RTK_VERSION=$(curl -fsSL https://api.github.com/repos/rtk-ai/rtk/releases/latest \
| jq -r '.tag_name' | sed 's/^v//'); \
curl -fsSL -o /tmp/rtk.tar.gz \
"https://github.com/rtk-ai/rtk/releases/download/v${RTK_VERSION}/rtk-${RTK_TARGET}.tar.gz"; \
tar -xzf /tmp/rtk.tar.gz -C /usr/local/bin rtk

# ── Ralphex binary (latest from GitHub Releases) ────────────────────────────
# Pattern from: claude-code/.devcontainer/Dockerfile
FROM alpine:3.21 AS ralphex-download
Expand Down Expand Up @@ -117,6 +133,7 @@ COPY --from=go-download /usr/local/go /usr/local/go
COPY --from=docker-download /usr/local/bin/docker /usr/local/bin/docker
COPY --from=hugo-download /usr/local/bin/hugo /usr/local/bin/hugo
COPY --from=ralphex-download /usr/local/bin/ralphex /srv/ralphex
COPY --from=rtk-download /usr/local/bin/rtk /usr/local/bin/rtk

ENV GOROOT=/usr/local/go \
GOPATH=/home/app/go
Expand Down
1 change: 1 addition & 0 deletions ralphex-fe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This is a standalone image, not a devcontainer.
| Python 3 | system |
| Playwright + Chromium | native Debian |
| Claude Code CLI | latest |
| RTK | latest (GitHub Releases) |
| Ralphex | latest (GitHub Releases) |
| Git, ripgrep, jq, curl, wget | system |

Expand Down
7 changes: 7 additions & 0 deletions ralphex-fe/init-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ if [ -d /mnt/claude ]; then
fi

chown -R app:app /home/app/.claude

# ── RTK: ensure rewrite hook is configured ─────────────────────────────
# Host mount usually brings the hook, but init idempotently to cover
# standalone usage (no host mount). Runs as app user for correct paths.
if command -v rtk >/dev/null 2>&1; then
gosu app rtk init -g --auto-patch 2>/dev/null || true
fi
fi

# copy credentials extracted from macOS keychain (mounted separately)
Expand Down