rebuild
This commit is contained in:
parent
76aeff861e
commit
07c00dddd6
|
|
@ -22,14 +22,15 @@ RUN rm -f /etc/nginx/sites-enabled/default
|
||||||
RUN cat > /entrypoint.sh << 'EOF'
|
RUN cat > /entrypoint.sh << 'EOF'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
VNC_PWD=${VNC_PASSWORD:-"123456"}
|
# VNC_PWD=${VNC_PASSWORD:-"123456"}
|
||||||
VNC_PORT=${VNC_PORT:-5900}
|
# VNC_PORT=${VNC_PORT:-5900}
|
||||||
DISPLAY_NUM=${DISPLAY_NUM:-99}
|
# DISPLAY_NUM=${DISPLAY_NUM:-99}
|
||||||
TARGET_URL=${TARGET_URL:-"https://www.baidu.com"}
|
# TARGET_URL=${TARGET_URL:-"https://www.baidu.com"}
|
||||||
|
TARGET_URL=${TARGET_URL:-"blank"}
|
||||||
|
|
||||||
Xvfb :${DISPLAY_NUM} -screen 0 1280x1024x24 &
|
Xvfb :99 -screen 0 1280x1024x24 &
|
||||||
sleep 2
|
sleep 2
|
||||||
export DISPLAY=:${DISPLAY_NUM}
|
export DISPLAY=:99
|
||||||
|
|
||||||
CHROME_BIN=$(find /ms-playwright -name "chrome" -type f -executable 2>/dev/null | head -1)
|
CHROME_BIN=$(find /ms-playwright -name "chrome" -type f -executable 2>/dev/null | head -1)
|
||||||
if [ -z "$CHROME_BIN" ]; then
|
if [ -z "$CHROME_BIN" ]; then
|
||||||
|
|
@ -45,9 +46,9 @@ fi
|
||||||
--disable-features=IsolateOrigins,site-per-process \
|
--disable-features=IsolateOrigins,site-per-process \
|
||||||
"${TARGET_URL}" &
|
"${TARGET_URL}" &
|
||||||
|
|
||||||
x11vnc -display :${DISPLAY_NUM} -forever -shared -passwd "${VNC_PWD}" -rfbport ${VNC_PORT} &
|
x11vnc -display :99 -forever -shared -rfbport 5900 &
|
||||||
|
|
||||||
/opt/novnc/utils/novnc_proxy --vnc localhost:${VNC_PORT} --listen 6080 &
|
/opt/novnc/utils/novnc_proxy --vnc localhost:5900 --listen 6080 &
|
||||||
|
|
||||||
# 启动 nginx
|
# 启动 nginx
|
||||||
nginx &
|
nginx &
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue