basecamp / Dockerfile
jpanasuk's picture
v1.0.5: self-healing (tavern self-check + update-check + CI pitfall testing), Fixer's toolbox in image (db clients, docker CLI, yq, net diag), 12-service coding starter pack with verified pitfalls in recipes
db81b0e
Raw
History Blame Contribute Delete
3.01 kB
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV OLLAMA_HOST=0.0.0.0:11434
ENV OLLAMA_MODELS=/root/.ollama/models
ENV BASECAMP_MODEL=llama3.1:8b
# ── System deps ──
# xz-utils is required by the Hermes installer (Node.js .tar.xz archive)
# The FIXER TOOLBOX: every CLI basecamp hermes needs to actually EXECUTE
# fixes, not just describe them (databases, docker, yaml, networking).
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip curl wget git ca-certificates xz-utils zstd \
supervisor procps jq gnupg \
# database clients β€” postgres/pgvector, sqlite, redis
postgresql-client sqlite3 redis-tools \
# docker CLI + compose plugin (for managing the stack when the
# docker socket is mounted into basecamp)
docker.io docker-compose-v2 \
# network diagnostics β€” the fixer must be able to SEE the network
iputils-ping dnsutils netcat-openbsd lsof \
# misc surgical tools
htop unzip file \
&& rm -rf /var/lib/apt/lists/* \
# yq (yaml editor) β€” not in Ubuntu 22.04 apt; official static binary
&& curl -fsSL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64" \
&& chmod +x /usr/local/bin/yq \
# mongosh (mongo shell) β€” 'mongodb-clients' doesn't exist on 22.04;
# install the official shell from MongoDB's apt repo instead.
&& curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/mongodb.gpg] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" > /etc/apt/sources.list.d/mongodb.list \
&& apt-get update && apt-get install -y --no-install-recommends mongodb-mongosh \
&& rm -rf /var/lib/apt/lists/*
# ── Install Ollama ──
RUN curl -fsSL https://ollama.com/install.sh | sh
# ── Install Hermes Agent ──
# Official installer (root-mode FHS layout -> /usr/local/bin/hermes, data -> /root/.hermes).
# WARNING: do NOT `pip3 install hermes-cli` β€” that PyPI package is an unrelated
# 0.0.1.x stub, NOT Hermes Agent. Use the official installer only.
# --skip-browser keeps the image lean; browser tooling can be added later.
RUN curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --skip-browser
ENV PATH="/usr/local/bin:/root/.local/bin:${PATH}"
# ── Basecamp discovery + tools ──
RUN mkdir -p /opt/basecamp
COPY discover.py /opt/basecamp/discover.py
COPY recipes.py /opt/basecamp/recipes.py
COPY tavern.sh /opt/basecamp/tavern.sh
COPY skins/ /opt/basecamp/skins/
COPY SOUL.md /opt/basecamp/SOUL.md
RUN chmod +x /opt/basecamp/discover.py /opt/basecamp/tavern.sh
# ── Supervisor config (Ollama only β€” Hermes is exec'd by the entrypoint) ──
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# ── Entrypoint ──
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 11434
WORKDIR /root
ENTRYPOINT ["/entrypoint.sh"]