Skip to content

Commit

Permalink
fix: 修复selenium弱密码的问题
Browse files Browse the repository at this point in the history
默认禁用vnc,默认vnc为只读模式,缺省弱密码改为强密码。
用户可以手动开启vnc,开启后可以指定是否只读,并修改vnc密码。
参考:
https://github.com/SeleniumHQ/docker-selenium#debugging
https://github.com/SeleniumHQ/docker-selenium#disabling-vnc
  • Loading branch information
liqiang-fit2cloud committed Sep 11, 2023
1 parent c443eef commit 02dd31c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions metersphere/docker-compose-seleniarm.yml
Expand Up @@ -5,7 +5,7 @@ services:
container_name: selenium-chrome
shm_size: 2gb
ports:
- "5900:5900" # password: secret
- "5900:5900"
depends_on:
- selenium-hub
entrypoint: bash -c '[ ! -f /home/seluser/language ] && sudo sed -i -e "s/# $$LANG.*/$$LANG UTF-8/" /etc/locale.gen && sudo dpkg-reconfigure --frontend=noninteractive locales && sudo update-locale LANG=$$LANG && touch /home/seluser/language; /opt/bin/entry_point.sh'
Expand All @@ -21,6 +21,9 @@ services:
- SCREEN_HEIGHT=1080
- LANGUAGE=zh_CN.UTF-8
- LANG=zh_CN.UTF-8
- SE_START_VNC=false
- SE_VNC_VIEW_ONLY=1
- SE_VNC_PASSWORD=Password123@selenium
restart: always
healthcheck:
test: ["CMD", "bash", "-c", "< /dev/tcp/localhost/5900"]
Expand All @@ -34,7 +37,7 @@ services:
container_name: selenium-firefox
shm_size: 2gb
ports:
- "5901:5900" # password: secret
- "5901:5900"
depends_on:
- selenium-hub
entrypoint: bash -c '[ ! -f /home/seluser/language ] && sudo sed -i -e "s/# $$LANG.*/$$LANG UTF-8/" /etc/locale.gen && sudo dpkg-reconfigure --frontend=noninteractive locales && sudo update-locale LANG=$$LANG && touch /home/seluser/language; /opt/bin/entry_point.sh'
Expand All @@ -50,6 +53,9 @@ services:
- SCREEN_HEIGHT=1080
- LANGUAGE=zh_CN.UTF-8
- LANG=zh_CN.UTF-8
- SE_START_VNC=false
- SE_VNC_VIEW_ONLY=1
- SE_VNC_PASSWORD=Password123@selenium
restart: always
healthcheck:
test: [ "CMD", "bash", "-c", "< /dev/tcp/localhost/5900" ]
Expand Down

0 comments on commit 02dd31c

Please sign in to comment.