mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
* Add Docker images and agent Docker Mods Ship official container images that run the Paseo daemon headless. One Dockerfile parametrized by BASE_IMAGE covers Debian 12/13, Ubuntu 22.04/24.04 and Alpine; it bundles Node 22, the npm-published server + CLI, a vendored s6-overlay as PID 1, and a small Docker Mods loader. Agents are chosen at runtime via DOCKER_MODS (pipe-separated mod images). Each mod is a FROM scratch image carrying only an install hook that runs `npm install -g <agent-cli>`; the loader pulls the layers from the registry, extracts them, and runs the hook before the daemon starts, so any requested agent is on PATH when Paseo probes provider availability. - docker/base: Dockerfile, install scripts, s6 services, mods loader - docker/mods/*: claude-code, codex, copilot, opencode, pi - docker/docker-compose.example.yml + docker/README.md - .github/workflows/docker.yml: multi-arch (amd64/arm64) buildx matrix, publishes to ghcr.io/getpaseo on version tags - docs/docker.md + CLAUDE.md docs index row * feat(docker): print pairing QR and link on daemon startup Add an s6 oneshot service that waits for the daemon to listen, then runs `paseo daemon pair` so the pairing QR code and link surface in the container logs. Best-effort: never blocks boot, skips gracefully when relay is disabled. Opt out with PASEO_PAIRING_QR=0. * build(docker): add Arch image support * ci(docker): build Arch without Buildx * docs(docker): document paseo env contract * feat(docker): add opt-in sudo mode * docs(docker): link env references * fix(docker): create agent config dirs * fix(docker): default home to /home/paseo * docs(docker): document agent auth setup * docs(docker): document relay port setup * fix(docker): install Node from tarball * docs: add Docker quick start * docs(docker): remove legacy home example * docs(docker): set container hostname * fix(docker): prepare opencode storage * fix(docker): allow paseo login shell * fix docker opencode permissions * ci(docker): use Node 24 actions * fix(docker): install bzip2 runtime tools * fix(docker): update Pi mod package * fix(docker): quiet default daemon logs * fix(docker): split home from state Docker images now keep HOME at /home/paseo and store Paseo daemon state under /home/paseo/.paseo by default. Existing volumes can keep the old layout by setting PASEO_HOME=/home/paseo. * fix(docker): keep mods out of paseo home * ci(docker): skip alpine arm64 builds * fix(docker): address review findings * fix(docker): verify s6 overlay downloads * fix(docker): honor custom healthcheck port * fix(docker): fail on mod extraction errors * feat(docker): add official container image Ship a focused daemon image with the bundled web UI enabled and document extending it with agent CLIs. * ci(docker): publish images only on stable releases * fix(docker): check daemon health over HTTP --------- Co-authored-by: Herbrant <cdavide98carnemolla@gmail.com>
80 lines
2.6 KiB
Docker
80 lines
2.6 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
ARG NODE_IMAGE=node:22-bookworm-slim
|
|
FROM ${NODE_IMAGE}
|
|
|
|
ARG PASEO_VERSION=latest
|
|
|
|
ENV HOME=/home/paseo \
|
|
PASEO_HOME=/home/paseo/.paseo \
|
|
PASEO_LISTEN=0.0.0.0:6767 \
|
|
PASEO_WEB_UI_ENABLED=true \
|
|
PASEO_LOG_FORMAT=json \
|
|
PASEO_LOG_LEVEL=info \
|
|
CLAUDE_CONFIG_DIR=/home/paseo/.claude \
|
|
CODEX_HOME=/home/paseo/.codex \
|
|
XDG_CONFIG_HOME=/home/paseo/.config \
|
|
XDG_DATA_HOME=/home/paseo/.local/share \
|
|
XDG_STATE_HOME=/home/paseo/.local/state \
|
|
XDG_CACHE_HOME=/home/paseo/.cache \
|
|
ONNXRUNTIME_NODE_INSTALL=skip
|
|
|
|
RUN set -eux; \
|
|
apt-get update; \
|
|
apt-get install -y --no-install-recommends \
|
|
bash \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
gosu \
|
|
openssh-client \
|
|
tini; \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN set -eux; \
|
|
npm install -g --omit=optional \
|
|
"@getpaseo/server@${PASEO_VERSION}" \
|
|
"@getpaseo/cli@${PASEO_VERSION}"; \
|
|
npm cache clean --force; \
|
|
server_entry="$(npm root -g)/@getpaseo/server/dist/scripts/supervisor-entrypoint.js"; \
|
|
test -f "$server_entry"; \
|
|
printf '%s\n' "$server_entry" > /etc/paseo-server-entry; \
|
|
node --check "$server_entry"
|
|
|
|
RUN set -eux; \
|
|
existing_group="$(getent group 1000 | cut -d: -f1 || true)"; \
|
|
if [ -n "$existing_group" ] && [ "$existing_group" != "paseo" ]; then \
|
|
groupmod --new-name paseo "$existing_group"; \
|
|
elif [ -z "$existing_group" ]; then \
|
|
groupadd --gid 1000 paseo; \
|
|
fi; \
|
|
existing_user="$(getent passwd 1000 | cut -d: -f1 || true)"; \
|
|
if [ -n "$existing_user" ] && [ "$existing_user" != "paseo" ]; then \
|
|
usermod --login paseo --gid paseo --home /home/paseo --shell /bin/bash "$existing_user"; \
|
|
elif [ -z "$existing_user" ]; then \
|
|
useradd --uid 1000 --gid paseo --create-home --home-dir /home/paseo --shell /bin/bash paseo; \
|
|
fi; \
|
|
mkdir -p \
|
|
/workspace \
|
|
"$PASEO_HOME" \
|
|
"$CLAUDE_CONFIG_DIR" \
|
|
"$CODEX_HOME" \
|
|
"$XDG_CONFIG_HOME" \
|
|
"$XDG_DATA_HOME" \
|
|
"$XDG_STATE_HOME" \
|
|
"$XDG_CACHE_HOME"; \
|
|
chown -R paseo:paseo /home/paseo /workspace
|
|
|
|
COPY rootfs/ /
|
|
RUN chmod +x /usr/local/bin/paseo-docker-entrypoint
|
|
|
|
WORKDIR /workspace
|
|
|
|
EXPOSE 6767
|
|
VOLUME ["/home/paseo"]
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
|
CMD node -e "const listen=process.env.PASEO_LISTEN||'0.0.0.0:6767'; const m=listen.match(/:(\\d+)$/); const port=m?Number(m[1]):6767; require('http').get({hostname:'127.0.0.1',port,path:'/api/health'},r=>process.exit(r.statusCode===200?0:1)).on('error',()=>process.exit(1))"
|
|
|
|
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/paseo-docker-entrypoint"]
|