aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorGuillermo Serrahima <dev@vylion.com>2026-06-22 02:49:02 +0200
committerGuillermo Serrahima <dev@vylion.com>2026-06-26 13:40:00 +0200
commit506713247b0099142ff873f5750933d49b182c37 (patch)
treedfe444c057a9addfeaa57951673cf2251802f049 /docker
downloadsenia-506713247b0099142ff873f5750933d49b182c37.tar.xz
senia-506713247b0099142ff873f5750933d49b182c37.zip
first commit
Diffstat (limited to 'docker')
-rw-r--r--docker/Dockerfile67
-rw-r--r--docker/compose.yml35
2 files changed, 102 insertions, 0 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
new file mode 100644
index 0000000..89f2448
--- /dev/null
+++ b/docker/Dockerfile
@@ -0,0 +1,67 @@
+FROM debian:trixie-slim
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+# core tooling
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ sudo \
+ curl \
+ wget \
+ git \
+ ca-certificates \
+ gnupg \
+ jq \
+ ripgrep \
+ less \
+ vim \
+ sqlite3 \
+ python3 \
+ python3-pip \
+ python3-venv \
+ build-essential \
+ pkg-config \
+ procps \
+ iputils-ping \
+ && rm -rf /var/lib/apt/lists/*
+
+# Narrow sudo: senia can run apt/apt-get only, no password.
+RUN echo "senia ALL=(root) NOPASSWD: /usr/bin/apt, /usr/bin/apt-get" \
+ > /etc/sudoers.d/senia-apt \
+ && chmod 440 /etc/sudoers.d/senia-apt \
+ && visudo -c -f /etc/sudoers.d/senia-apt
+# the visudo -c validates the file syntax; build fails if it's malformed
+
+# nodejs (for claude code) — using nodesource for a recent version
+RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
+ && apt-get install -y --no-install-recommends nodejs \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN npm install -g npm@11.14.0
+# claude code itself
+RUN npm install -g @anthropic-ai/claude-code
+
+RUN pip3 install --break-system-packages mcp
+
+# create non-root user matching common host uid (1000) so mounted volumes have correct ownership
+ARG USER_UID=750
+ARG USER_GID=750
+RUN groupadd --system --gid ${USER_GID} senia \
+ && useradd --system --uid ${USER_UID} --gid ${USER_GID} -m -s /bin/bash senia \
+ && echo "umask 002" >> /home/senia/.bashrc
+
+USER senia
+# Install uv (the modern python package manager) system-wide so senia can use it
+# We install it as senia to avoid root-owned install paths.
+RUN curl -LsSf https://astral.sh/uv/install.sh | sh
+# uv installs to /home/senia/.local/bin/uv
+
+# Set up npm to install globally into senia's home (no sudo needed)
+RUN mkdir -p /home/senia/.npm-global \
+ && npm config set prefix /home/senia/.npm-global
+
+# Make sure her PATH includes the user-local bin dirs
+ENV PATH=/home/senia/.local/bin:/home/senia/.npm-global/bin:$PATH
+
+WORKDIR /workspace
+
+CMD ["bash"]
diff --git a/docker/compose.yml b/docker/compose.yml
new file mode 100644
index 0000000..a87efdd
--- /dev/null
+++ b/docker/compose.yml
@@ -0,0 +1,35 @@
+services:
+ senia:
+ build:
+ context: .
+ dockerfile: Dockerfile
+ args:
+ USER_UID: 750
+ USER_GID: 750
+ image: senia/claude:latest
+ container_name: senia
+ stdin_open: true
+ tty: true
+ volumes:
+ # workspace — read/write, this is where senia does its work
+ - ../workspace:/workspace
+
+ # claude config and auth — read/write so /login persists
+ - ../claude/auth:/home/senia/.claude
+ - ../claude/.claude.json:/home/senia/.claude.json
+
+ # CLAUDE.md mounted at root, found via hierarchical lookup from any workspace
+ - ../claude/CLAUDE.md:/home/senia/.claude/CLAUDE.md:ro
+
+ # dockerfile read-only — senia can read it, suggest edits in conversation, can't modify
+ - ./Dockerfile:/etc/senia/Dockerfile:ro
+
+ # mcp servers source, read-only
+ - ../mcp:/etc/senia/mcp:ro
+
+ - ../scripts:/etc/senia/scripts
+ # data dir — read-write, where mcp servers store sqlite dbs and other state
+ - ../data:/etc/senia/data
+
+ working_dir: /workspace
+ command: tail -f /dev/null