Skip to content

Commit ae95736

Browse files
jkyberneeesclaude
andcommitted
docs(docker): comment how to add extra deps (Node, Python, Bun, Debian base)
Add a commented section to docker/Dockerfile showing how to install extra runtimes/CLIs the agent can call: Alpine apk one-liners (nodejs, python3, go, build tools, ripgrep), npm-global package managers (pnpm/yarn), the Bun musl installer, and a fallback to a Debian base / official language images for glibc-only toolchains — with the adduser->useradd note. All comments; the build is unchanged. `docker build --check` passes with no warnings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 66c085c commit ae95736

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

docker/Dockerfile

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,50 @@ RUN CGO_ENABLED=0 go build -ldflags "-s -w" -o /out/odek ./cmd/odek
1818
# ---- runtime stage ----
1919
FROM alpine:latest
2020
# Tooling the agent commonly needs inside the sandbox container.
21-
# Trim or extend this list to taste.
21+
# Trim or extend this list to taste. (git is already included here.)
2222
RUN apk add --no-cache ca-certificates git bash coreutils curl jq
2323

24+
# ── Adding extra dependencies the agent can use ──────────────────────────
25+
# The agent runs shell commands INSIDE this image, so any runtime or CLI it
26+
# should call must be installed here. Uncomment what you need, then rebuild
27+
# with `docker compose --profile <name> up --build`.
28+
#
29+
# IMPORTANT: keep all installs ABOVE the `USER odek` line below — apk, npm,
30+
# and the Bun installer need root.
31+
#
32+
# Alpine packages (musl libc — small and fast):
33+
# RUN apk add --no-cache nodejs npm # Node.js + npm
34+
# RUN apk add --no-cache python3 py3-pip # Python 3 + pip
35+
# RUN apk add --no-cache go # Go toolchain
36+
# RUN apk add --no-cache make gcc g++ musl-dev # build-essential equivalents
37+
# RUN apk add --no-cache ripgrep fd jq yq # search / JSON-YAML tools
38+
#
39+
# JS package managers (once npm is present):
40+
# RUN npm install -g pnpm yarn
41+
#
42+
# Bun (official installer; needs bash + unzip; BUN_INSTALL puts it on PATH).
43+
# Uses Bun's musl build on Alpine; libstdc++ is required at runtime:
44+
# RUN apk add --no-cache bash unzip libstdc++ \
45+
# && curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash
46+
# # → installs /usr/local/bin/bun
47+
#
48+
# ── Heavy / glibc-only toolchains: switch to a Debian base ───────────────
49+
# If a tool won't run on Alpine's musl, replace `FROM alpine:latest` above
50+
# with a Debian-based image and use apt-get instead:
51+
#
52+
# FROM debian:bookworm-slim
53+
# RUN apt-get update && apt-get install -y --no-install-recommends \
54+
# ca-certificates git bash curl jq python3 python3-pip nodejs npm \
55+
# && rm -rf /var/lib/apt/lists/*
56+
#
57+
# …or start from an official language image that already bundles the runtime:
58+
# FROM node:20-bookworm-slim # Node.js + npm preinstalled
59+
# FROM python:3.12-slim # Python preinstalled
60+
#
61+
# On a Debian base, the user-creation line below differs — replace
62+
# `adduser -D -u 1000 odek` with `useradd -m -u 1000 odek`
63+
# (the mkdir/chown, ENV HOME, USER, and WORKDIR lines all work unchanged).
64+
2465
# Run as a non-root user — defense in depth even inside the container.
2566
# Pre-create ~/.odek owned by the user so a mounted named volume (used for
2667
# Telegram session state) inherits uid 1000 ownership and is writable.

0 commit comments

Comments
 (0)