fix(docker): support .mjs entrypoints in images and e2e

This commit is contained in:
Peter Steinberger
2026-02-06 17:18:10 -08:00
parent 2b6cf03b47
commit 80d42eb0ba
8 changed files with 116 additions and 59 deletions
+14 -4
View File
@@ -80,10 +80,20 @@ LOGINCTL
fi
npm install -g --prefix /tmp/npm-prefix "/app/$pkg_tgz"
npm_bin="/tmp/npm-prefix/bin/openclaw"
npm_entry="/tmp/npm-prefix/lib/node_modules/openclaw/dist/index.js"
git_entry="/app/dist/index.js"
git_cli="/app/openclaw.mjs"
npm_bin="/tmp/npm-prefix/bin/openclaw"
npm_root="/tmp/npm-prefix/lib/node_modules/openclaw"
if [ -f "$npm_root/dist/index.mjs" ]; then
npm_entry="$npm_root/dist/index.mjs"
else
npm_entry="$npm_root/dist/index.js"
fi
if [ -f "/app/dist/index.mjs" ]; then
git_entry="/app/dist/index.mjs"
else
git_entry="/app/dist/index.js"
fi
git_cli="/app/openclaw.mjs"
assert_entrypoint() {
local unit_path="$1"