mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-15 18:15:53 +00:00
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.
This commit is contained in:
1 parent
07991dabaf
commit
f02de334e5
3 files changed
+62
-19
No files matched your search
+12
-7
@@ -44,12 +44,17 @@ RUN install -d -m 0755 /etc/apt/keyrings \
|
||||
&& rm -f /tmp/glab.deb \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# --- agent cli path --------------------------------------------------------
|
||||
# Puts the $HOME directories the agent installers write to on PATH.
|
||||
ENV PATH=/home/paseo/.local/bin:/home/paseo/.opencode/bin:$PATH
|
||||
# --- 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 to set the paseo user's password while still
|
||||
# root -- see entrypoint.sh.
|
||||
COPY --chmod=0755 entrypoint.sh /usr/local/bin/paseo-sudo-entrypoint
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/paseo-sudo-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"]
|
||||
Reference in new issue
Block a user