Skip to content

Commit 71e3a98

Browse files
feat: update openclaw Dockerfile
1 parent 42baebe commit 71e3a98

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

openclaw/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ RUN ln -sf /app/openclaw.mjs /usr/local/bin/openclaw && \
270270
chmod 755 /usr/local/bin/docker-entrypoint.sh /app/openclaw.mjs
271271

272272
ENV NODE_ENV=production
273+
ENV PLAYWRIGHT_BROWSERS_PATH=/home/node/.cache/ms-playwright
273274

274275
# Security hardening: Run as non-root user
275276
# The node:24-bookworm image includes a 'node' user (uid 1000)

openclaw/docker-entrypoint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
#!/bin/sh
22
set -eu
33

4+
PLAYWRIGHT_ROOT="${PLAYWRIGHT_BROWSERS_PATH:-/home/node/.cache/ms-playwright}"
5+
STABLE_BROWSER_LINK="${PLAYWRIGHT_ROOT}/openclaw-browser"
6+
LATEST_BROWSER_PATH="$(
7+
find "$PLAYWRIGHT_ROOT" -type f \( -path '*/chrome-linux64/chrome' -o -path '*/chrome-linux/chrome' \) 2>/dev/null \
8+
| sort -V \
9+
| tail -n 1
10+
)"
11+
12+
if [ -n "${LATEST_BROWSER_PATH}" ]; then
13+
mkdir -p "$PLAYWRIGHT_ROOT"
14+
ln -sfn "$LATEST_BROWSER_PATH" "$STABLE_BROWSER_LINK"
15+
fi
16+
417
printf '\033[1;32m%s\033[0m\n' 'This image is maintained by 1Panel.'
518
printf '\033[1;33m%s\033[0m\n' 'For support or issue discussion, please visit:'
619
printf '\033[1;36m%s\033[0m\n' 'https://github.com/1Panel-dev/1Panel/discussions'

0 commit comments

Comments
 (0)