Files
composes/paseo/Dockerfile
T
tiennm99 f02de334e5 feat(paseo): install SDKMAN on start, and rename the wrapper entrypoint
SDKMAN goes into ~/.sdkman whenever that directory is missing, the same way
the agent CLIs arrive: as paseo, through gosu, onto the volume, where `sdk
install` can write and the candidates persist. No variable gates it.

The chown of /home/paseo moves out of the AGENT_CLIS guard, since SDKMAN now
needs it even when no agent is named, and the agent loop reads AGENT_CLIS into
a local first so `set -u` does not trip on it being unset.

SDKMAN_DIR is set in the image, and the current/bin of java, scala, gradle,
maven and sbt joins PATH: `sdk` itself is a shell function from the rc hook and
so exists in terminals only, while the daemon and an agent's non-interactive
commands read no rc file and need the binaries on PATH.

paseo-sudo-entrypoint was named for the one thing it used to do. It is
/usr/local/bin/entrypoint now, matching the source file.
2026-09-17 14:21:25 +07:00

61 lines
2.8 KiB
Docker

# Adds language toolchains and CLI tooling to the official image, which ships
# none of it. Agent CLIs are not among them -- see README.md, which carries the
# reasoning for everything here.
FROM ghcr.io/getpaseo/paseo:latest
# --- system packages -------------------------------------------------------
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
less nano jq unzip zip lsof psmisc ugrep bfs zsh sudo \
build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& usermod -aG sudo paseo
# --- python ----------------------------------------------------------------
ARG PYTHON_VERSION=3.12
ENV UV_INSTALL_DIR=/usr/local/bin \
UV_PYTHON_INSTALL_DIR=/opt/python \
UV_PYTHON_BIN_DIR=/usr/local/bin
RUN curl -fsSL https://astral.sh/uv/install.sh | sh \
&& uv python install "${PYTHON_VERSION}" --default
# --- go --------------------------------------------------------------------
ARG GO_VERSION=1.26.8
ENV PATH=/usr/local/go/bin:$PATH
RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
-o /tmp/go.tar.gz \
&& tar -C /usr/local -xzf /tmp/go.tar.gz \
&& rm /tmp/go.tar.gz
# --- gh and glab -----------------------------------------------------------
# gh from GitHub's signed apt repository, glab from the .deb on its releases
# page.
ARG GLAB_VERSION=1.118.0
RUN install -d -m 0755 /etc/apt/keyrings \
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
-o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
> /etc/apt/sources.list.d/github-cli.list \
&& curl -fsSL "https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_$(dpkg --print-architecture).deb" \
-o /tmp/glab.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends gh /tmp/glab.deb \
&& rm -f /tmp/glab.deb \
&& rm -rf /var/lib/apt/lists/*
# --- agent cli and sdkman path ---------------------------------------------
# Puts the $HOME directories the agent installers and SDKMAN write to on PATH.
ENV SDKMAN_DIR=/home/paseo/.sdkman
ENV PATH=/home/paseo/.local/bin:/home/paseo/.opencode/bin:\
$SDKMAN_DIR/candidates/java/current/bin:\
$SDKMAN_DIR/candidates/scala/current/bin:\
$SDKMAN_DIR/candidates/gradle/current/bin:\
$SDKMAN_DIR/candidates/maven/current/bin:\
$SDKMAN_DIR/candidates/sbt/current/bin:$PATH
# --- entrypoint ------------------------------------------------------------
# Wraps the image's entrypoint with the root-stage setup -- see entrypoint.sh.
COPY --chmod=0755 entrypoint.sh /usr/local/bin/entrypoint
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/entrypoint"]