Skip to content

Commit a68d6cc

Browse files
author
Tinywan
committed
fix(entrypoint): search /opt for libphpx.so to ensure it is bundled into portable dist
1 parent 2bdfefa commit a68d6cc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎docker/entrypoint.sh‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,15 @@ done
181181

182182
# 确保核心运行时动态库存在,并复制到根目录和 lib/ 目录
183183
for required_library in 'libphpx.so*' 'libphp.so*'; do
184-
found_lib="$(find "$stage_dir/lib" /usr -name "$required_library" -type f 2>/dev/null | head -n 1 || true)"
184+
found_lib="$(find /opt /usr "$stage_dir/lib" -name "$required_library" -type f 2>/dev/null | head -n 1 || true)"
185185
if [[ -n "$found_lib" && -f "$found_lib" ]]; then
186186
libname="$(basename "$found_lib")"
187187
clean_libname="${libname%%.*}.so"
188188
cp -L "$found_lib" "$stage_dir/$clean_libname" || true
189189
cp -L "$found_lib" "$stage_dir/lib/$libname" || true
190+
else
191+
echo "[ERROR] Required library $required_library not found in /opt or /usr!" >&2
192+
exit 1
190193
fi
191194
done
192195

0 commit comments

Comments
 (0)