mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-11 03:13:16 +00:00
- Remove HOST=${SERVICE_HOSTNAME} from code-server, code-server-lsio and paseo; hostname: alone sets the name
- Move SERVICE_HOSTNAME to the top of their .env.example to match compose order
- Drop the openclaw ARM64 Chromium note from its README; docs/openclaw covers it
- List CUSTOM_USER in webtop's setup step
- Trim reasoning from diun and paseo comments
- Delete stale gitea and gitea-mirror .gitignore files
- Add TODO.md for remaining naming and README issues
54 lines
1.5 KiB
Bash
Executable File
54 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs as root ahead of the image's own entrypoint: sets the paseo user's
|
|
# login password, then installs any agent CLI named in AGENTS whose command
|
|
# does not already run. See README.md.
|
|
set -euo pipefail
|
|
|
|
if [[ "$(id -u)" != "0" ]]; then
|
|
exec /usr/local/bin/paseo-docker-entrypoint "$@"
|
|
fi
|
|
|
|
if [[ -n "${PASEO_PASSWORD:-}" ]]; then
|
|
printf 'paseo:%s\n' "$PASEO_PASSWORD" | /usr/sbin/chpasswd \
|
|
|| echo "entrypoint: could not set the paseo password, continuing" >&2
|
|
fi
|
|
|
|
agent_installer() {
|
|
case "$1" in
|
|
claude) echo 'curl -fsSL https://claude.ai/install.sh | bash' ;;
|
|
codex) echo 'curl -fsSL https://chatgpt.com/codex/install.sh | sh' ;;
|
|
opencode) echo 'curl -fsSL https://opencode.ai/install | bash' ;;
|
|
copilot) echo 'curl -fsSL https://gh.io/copilot-install | bash' ;;
|
|
omp) echo 'curl -fsSL https://omp.sh/install | sh' ;;
|
|
pi) echo 'curl -fsSL https://pi.dev/install.sh | sh' ;;
|
|
esac
|
|
}
|
|
|
|
agents="${AGENTS:-}"
|
|
|
|
set -f
|
|
|
|
for agent in ${agents//,/ }; do
|
|
installer="$(agent_installer "$agent")"
|
|
|
|
if [[ -z "$installer" ]]; then
|
|
echo "entrypoint: no such agent CLI: $agent" >&2
|
|
continue
|
|
fi
|
|
|
|
# Skip the agent when its command runs.
|
|
rc=0
|
|
/usr/sbin/gosu paseo bash -c '"$0" --version' "$agent" >/dev/null 2>&1 \
|
|
|| rc=$?
|
|
|
|
if (( rc != 126 && rc != 127 )); then
|
|
continue
|
|
fi
|
|
|
|
echo "entrypoint: installing $agent"
|
|
/usr/sbin/gosu paseo bash -c "$installer" \
|
|
|| echo "entrypoint: $agent failed to install, continuing" >&2
|
|
done
|
|
|
|
exec /usr/local/bin/paseo-docker-entrypoint "$@"
|