diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a081401..1aea5cd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -9,6 +9,9 @@ ARG OLLAMA_VERSION=0.32.5 # Use the official Ollama image to get the binary FROM ollama/ollama:${OLLAMA_VERSION} AS ollama-bin +# ── Tailscale binaries from official image ───────────────────────────── +FROM tailscale/tailscale:stable AS tailscale + # ── Node.js builder: ModelRelay + OmniRoute + Hermes Web UI + TUI ─────── FROM node:24-slim AS node-builder @@ -112,13 +115,20 @@ ENV DEBIAN_FRONTEND=noninteractive # Copy the Ollama binary from the official image COPY --from=ollama-bin --chown=1000:1000 /usr/bin/ollama /usr/local/bin/ollama +# Copy Tailscale binaries from the official image +COPY --from=tailscale /usr/local/bin/tailscaled /usr/local/bin/tailscaled +COPY --from=tailscale /usr/local/bin/tailscale /usr/local/bin/tailscale + +# Create Tailscale state directories +RUN mkdir -p /var/run/tailscale /var/lib/tailscale /var/cache/tailscale + # ── System packages + ALL heavy installs in ONE layer ──────────────────. RUN apt-get update \ && apt-get install -y --no-install-recommends \ zsh ripgrep jq curl git ca-certificates gnupg zstd sudo \ python3 python3-pip nodejs npm \ && rm -rf /var/lib/apt/lists/* \ - + \ # ── Ensure a non-root user with UID 1000 exists ────────────────────── && UID1000_USER=$(getent passwd 1000 | cut -d: -f1) \ && if [ -z "$UID1000_USER" ]; then \ @@ -128,10 +138,10 @@ RUN apt-get update \ fi \ && echo "${UID1000_USER} ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/vscode \ && chmod 0440 /etc/sudoers.d/vscode \ - + \ # ── Ollama (direct binary install – reliable in Docker) ─────────── && ollama --version \ - + \ # ── Bake Ollama embedding model into image ─────────────────────── # Pull nomic-embed-text at build time so it's available instantly # at runtime with zero RAM spike or download delay. (~300MB) @@ -144,15 +154,7 @@ RUN apt-get update \ OLLAMA_MODELS=/usr/share/ollama/.ollama/models /usr/local/bin/ollama pull nomic-embed-text && \ ls -la /usr/share/ollama/.ollama/models/ && \ find /usr/share/ollama/.ollama/models -type f | head -20 && \ - OLLAMA_MODELS=/usr/share/ollama/.ollama/models ollama list && \ kill %1 && wait 2>/dev/null || true \ - \ - # ── TailScale ───────────────────────────────────────────────────── - #&& mkdir -p /var/run/tailscale /var/lib/tailscale \ - #&& (curl -fsSL https://tailscale.com/install.sh | bash || echo "WARN: tailscale install failed, continuing") \ - #&& rm -rf /var/lib/apt/lists/* \ - - # ── Mnemon ──────────────────────────────────────────────────────── && ARCH=amd64 \ && curl -sL "https://github.com/mnemon-dev/mnemon/releases/download/v${MNEMON_VERSION}/mnemon_${MNEMON_VERSION}_linux_${ARCH}.tar.gz" \ @@ -161,11 +163,7 @@ RUN apt-get update \ && cp /tmp/mnemon /usr/local/bin/mnemon \ && chmod +x /usr/local/bin/mnemon \ && rm -rf /tmp/mnemon.tar.gz /tmp/mnemon \ - - && curl -fsSL https://claude.ai/install.sh | bash \ - - # ── Final cleanup ───────────────────────────────────────────────── && apt-get autoremove -y \ && apt-get clean \