Test worked
This commit is contained in:
+45
-25
@@ -387,10 +387,11 @@
|
||||
<h1 class="glitch-title" data-text="CLAUDARIS">CLAUDARIS</h1>
|
||||
<div class="subtitle">
|
||||
/klaw-<span class="accent">DAR</span>-iss/ — a moveable docker container for
|
||||
<span class="accent2">Claude Code</span>. using Arch btw.
|
||||
<span class="accent2">Claude Code</span> and <span class="accent2">OpenCode</span>. using Arch btw.
|
||||
</div>
|
||||
<div class="tags">
|
||||
<span class="tag">ARCHLINUX</span>
|
||||
<span class="tag">DOCKER COMPOSE</span>
|
||||
<span class="tag">TMUX</span>
|
||||
<span class="tag">SELF-HOSTED</span>
|
||||
<span class="tag">NO-RESTART-POLICY</span>
|
||||
@@ -414,11 +415,14 @@
|
||||
<pre><code>./claudaris config</code></pre>
|
||||
<p>
|
||||
It writes your answers to <code>.env</code> (gitignored — every user
|
||||
keeps their own), which every other command sources. Set
|
||||
<code>NAME</code> to something unique to you (e.g. <code>claude-ten</code>)
|
||||
if more than one person is running a container from this same repo
|
||||
checkout. Re-run <code>config</code> / <code>configure</code> any time
|
||||
to update it.
|
||||
keeps their own). <code>claudaris</code> sources it, and
|
||||
<code>docker compose</code> reads the same file automatically since it
|
||||
lives in the project directory compose runs from — so
|
||||
<code>claudaris</code> and plain <code>docker compose</code> commands
|
||||
always agree. Set <code>NAME</code> to something unique to you (e.g.
|
||||
<code>claude-ten</code>) if more than one person is running a container
|
||||
from this same repo checkout. Re-run <code>config</code> /
|
||||
<code>configure</code> any time to update it.
|
||||
</p>
|
||||
<table>
|
||||
<tr><th>variable</th><th>purpose</th><th>default</th></tr>
|
||||
@@ -429,7 +433,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="name">DATA_DIR</td>
|
||||
<td>Host directory for volume mount data — bashrc, aliases, Claude auth, ssh keys.</td>
|
||||
<td>Host directory for volume mount data — bashrc, aliases, Claude Code / OpenCode auth, ssh keys.</td>
|
||||
<td class="default">/data/$NAME</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -442,7 +446,14 @@
|
||||
|
||||
<section id="commands">
|
||||
<h2>Commands</h2>
|
||||
<p class="dim">Everything runs through the single <code>claudaris</code> entry point.</p>
|
||||
<p class="dim">
|
||||
<code>claudaris</code> is a thin wrapper around
|
||||
<code>docker compose</code> (see <code>docker-compose.yml</code>) — it
|
||||
adds the config wizard and host-side seeding, then shells out to
|
||||
compose for the actual container lifecycle. Plain <code>docker
|
||||
compose</code> commands work directly too, once <code>start</code> has
|
||||
seeded the host once.
|
||||
</p>
|
||||
|
||||
<div class="cmd-grid">
|
||||
<div class="cmd-card">
|
||||
@@ -452,22 +463,22 @@
|
||||
</div>
|
||||
<div class="cmd-card">
|
||||
<div><span class="cmd">build</span></div>
|
||||
<div class="desc">Builds the image (always <code>--no-cache --pull</code>, so it picks up the latest Claude Code release).</div>
|
||||
<div class="desc"><code>docker compose build --no-cache --pull</code> — always uncached, so it picks up the latest Claude Code / OpenCode releases.</div>
|
||||
<pre><code>sudo ./claudaris build</code></pre>
|
||||
</div>
|
||||
<div class="cmd-card">
|
||||
<div><span class="cmd">start</span></div>
|
||||
<div class="desc">Creates or restarts the container with all volumes wired up.</div>
|
||||
<div class="desc">Seeds host files, then <code>docker compose up -d</code> with all volumes wired up.</div>
|
||||
<pre><code>sudo ./claudaris start</code></pre>
|
||||
</div>
|
||||
<div class="cmd-card">
|
||||
<div><span class="cmd">connect</span></div>
|
||||
<div class="desc">Starts the container if needed, then attaches your tmux session.</div>
|
||||
<div class="desc">Starts the container if needed, then <code>docker compose exec</code>s a shell.</div>
|
||||
<pre><code>sudo ./claudaris connect</code></pre>
|
||||
</div>
|
||||
<div class="cmd-card">
|
||||
<div><span class="cmd">remove</span><span class="alias">stop · rm</span></div>
|
||||
<div class="desc">Stops and removes the container so the next <code>start</code> recreates it fresh.</div>
|
||||
<div class="desc"><code>docker compose down</code> — stops and removes the container so the next <code>start</code> recreates it fresh.</div>
|
||||
<pre><code>sudo ./claudaris remove</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
@@ -481,21 +492,28 @@
|
||||
<em>before</em> running <code>./claudaris start</code>. If present, it's
|
||||
bind-mounted read-only to <code>/root/.ssh</code>.
|
||||
</p>
|
||||
<div class="note"><strong>off by default</strong> — nothing is mounted unless the directory exists.</div>
|
||||
<div class="note"><strong>off by default</strong> — nothing is mounted unless the directory exists. Since compose can't make a volume conditional on a host path existing, <code>start</code> writes (or removes) a gitignored <code>docker-compose.override.yml</code> to add this mount, which compose merges automatically when present.</div>
|
||||
</section>
|
||||
|
||||
<section id="internals">
|
||||
<h2>Internals</h2>
|
||||
|
||||
<p><strong style="color:var(--green)">Persistent login.</strong>
|
||||
Claude Code is installed at build time under <code>/root</code>, so a
|
||||
rebuild always picks up the latest release. Two files are bind-mounted
|
||||
individually to survive that: <code>~/.claude/.credentials.json</code>
|
||||
(the OAuth token) and <code>~/.claude.json</code> (account/onboarding
|
||||
state — Claude Code checks this too, so persisting the token alone
|
||||
isn't enough to avoid a re-login prompt after a rebuild).
|
||||
<code>./claudaris start</code> seeds both from empty on the host the
|
||||
first time it runs.
|
||||
Claude Code and OpenCode are both installed at build time (Claude Code
|
||||
via installer straight into <code>/root</code>; OpenCode via
|
||||
<code>pacman</code>), so a rebuild always picks up the latest release.
|
||||
Three files are bind-mounted individually to survive that:
|
||||
<code>~/.claude/.credentials.json</code> (the OAuth token),
|
||||
<code>~/.claude.json</code> (account/onboarding state — Claude Code
|
||||
checks this too, so persisting the token alone isn't enough to avoid a
|
||||
re-login prompt after a rebuild), and
|
||||
<code>~/.local/share/opencode/auth.json</code> (OpenCode's provider
|
||||
credentials). <code>./claudaris start</code> seeds all three from empty
|
||||
on the host the first time it runs. All three are individual-file
|
||||
mounts rather than a directory volume, since both tools likely save
|
||||
atomically (write a temp file, then <code>rename()</code> over the
|
||||
target) — <code>rename()</code> onto a symlink replaces the symlink
|
||||
instead of writing through it, silently breaking persistence.
|
||||
</p>
|
||||
|
||||
<p><strong style="color:var(--green)">Self-stopping.</strong>
|
||||
@@ -518,8 +536,8 @@
|
||||
</p>
|
||||
|
||||
<p><strong style="color:var(--green)">Hostname.</strong>
|
||||
The container is started with <code>--hostname "$NAME"</code>, so the
|
||||
prompt reads <code>root@claudaris</code> (or whatever you set
|
||||
<code>docker-compose.yml</code> sets <code>hostname: ${NAME}</code>, so
|
||||
the prompt reads <code>root@claudaris</code> (or whatever you set
|
||||
<code>NAME</code> to) instead of a random container ID.
|
||||
</p>
|
||||
</section>
|
||||
@@ -528,7 +546,9 @@
|
||||
<h2>Repo layout</h2>
|
||||
<ul class="check">
|
||||
<li><code>claudaris</code> — the entry point: build / start / connect / remove / help.</li>
|
||||
<li><code>Dockerfile</code> — Arch base image, dotfiles, Claude Code install, entrypoint.</li>
|
||||
<li><code>docker-compose.yml</code> — the container definition (image, volumes) that <code>claudaris</code> wraps.</li>
|
||||
<li><code>docker-compose.override.yml</code> — gitignored, written by <code>start</code> for the opt-in SSH mount.</li>
|
||||
<li><code>Dockerfile</code> — Arch base image, dotfiles, Claude Code / OpenCode install, entrypoint.</li>
|
||||
<li><code>.env</code> — written by <code>claudaris config</code>, per-user, gitignored.</li>
|
||||
<li><code>files/</code> — <code>bashrc</code>, <code>bash_aliases</code>, <code>entrypoint.sh</code>, <code>tmux</code> wrapper, <code>tmux.conf</code>.</li>
|
||||
<li><code>AGENTS.md</code> — deep-dive notes for anyone (human or agent) hacking on this repo.</li>
|
||||
@@ -536,7 +556,7 @@
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
claudaris <span class="blink">█</span> moveable · self-hosted · always running the latest Claude Code
|
||||
claudaris <span class="blink">█</span> moveable · self-hosted · always running the latest Claude Code + OpenCode
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user