From b61bca80e3223fb5e73bfb50bb407077c6db7f85 Mon Sep 17 00:00:00 2001 From: Lao Uncle Date: Fri, 31 Jul 2026 18:43:23 -0400 Subject: [PATCH 1/2] Add Tailscale support in Dockerfile Added Tailscale binaries and created necessary state directories in Dockerfile. --- .devcontainer/Dockerfile | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index a081401..b6bf549 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,6 +115,13 @@ 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 \ @@ -144,14 +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/* \ - + kill %1 && wait 2>/dev/null || true \\ # ── Mnemon ──────────────────────────────────────────────────────── && ARCH=amd64 \ From 9d65e4aaeefc0ec7b06177bc3c55e95513bc7971 Mon Sep 17 00:00:00 2001 From: Lao Uncle Date: Fri, 31 Jul 2026 18:54:37 -0400 Subject: [PATCH 2/2] Refactor Dockerfile for improved readability --- .devcontainer/Dockerfile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b6bf549..1aea5cd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -128,7 +128,7 @@ RUN apt-get update \ 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 \ @@ -138,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) @@ -154,8 +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 && \ - kill %1 && wait 2>/dev/null || true \\ - + kill %1 && wait 2>/dev/null || true \ # ── Mnemon ──────────────────────────────────────────────────────── && ARCH=amd64 \ && curl -sL "https://github.com/mnemon-dev/mnemon/releases/download/v${MNEMON_VERSION}/mnemon_${MNEMON_VERSION}_linux_${ARCH}.tar.gz" \ @@ -164,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 \