我正在尝试在 ubuntu 18.04 上运行 Zalenium docker。下面是我的命令。
curl -sSL https://raw.githubusercontent.com/dosel/t/i/p | bash -s start
or
docker run --rm -ti -p 4404:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /home/emiteqa/eMite/videos:/home/seluser/videos --privileged dosel/zalenium start
我被困在“为仪表板复制文件”
Docker binary already present, will use that one.
Docker version 18.09.0, build 4d60db4
-- LOG 07:33:35:233537096 Ensuring docker works...
-- LOG 07:33:35:414698248 Ensuring docker-selenium is available...
haveged: haveged starting up
Copying files for Dashboard...
经过调查,我发现原因是 zalenium 挂在zalenium.sh的下一行
sudo chown -R ${HOST_UID}:${HOST_GID} /home/seluser
然后,我进入 zalenium 容器。我尝试在容器中的任何文件上运行 sudo chown,它卡住了。
seluser@5ada56c01231:~$ ls -ltr
total 40396
-rwxrwxr-x 1 seluser root 41277 Nov 24 15:23 zalenium.sh
-rwxrw-r-- 1 seluser root 15086 Nov 24 15:23 zalando.ico
-rwxrwxr-x 1 seluser root 770 Nov 24 15:23 wait-testingbot.sh
-rwxrwxr-x 1 seluser root 983 Nov 24 15:23 wait-saucelabs.sh
-rwxrwxr-x 1 seluser root 933 Nov 24 15:23 wait-lambdatest.sh
-rwxrwxr-x 1 seluser root 746 Nov 24 15:23 wait-cbt.sh
-rwxrwxr-x 1 seluser root 831 Nov 24 15:23 wait-browserstack.sh
-rwxrwxr-x 1 seluser root 1268 Nov 24 15:23 start-testingbot.sh
-rwxrwxr-x 1 seluser root 2679 Nov 24 15:23 start-saucelabs.sh
-rwxrwxr-x 1 seluser root 1061 Nov 24 15:23 start-lambdatest.sh
-rwxrwxr-x 1 seluser root 1078 Nov 24 15:23 start-cbt.sh
-rwxrwxr-x 1 seluser root 1287 Nov 24 15:23 start-browserstack.sh
-rwxrw-r-- 1 seluser root 2699 Nov 24 15:23 logging_info.properties
-rwxrw-r-- 1 seluser root 2738 Nov 24 15:23 logging_debug.properties
-rwxrw-r-- 1 seluser root 1082 Nov 24 15:23 logback.xml
-rwxrw-r-- 1 seluser root 2128 Nov 24 15:23 LICENSE.md
-rwxrw-r-- 1 seluser root 637 Nov 24 15:23 error.html.bak
-rwxrw-r-- 1 seluser root 10996 Nov 24 15:23 dashboard_template.html
-rwxrw-r-- 1 seluser root 4529 Nov 24 15:23 Analytics.md
-rw-rw-r-- 1 root root 41184199 Nov 24 15:23 zalenium-3.141.59v.jar
drwxrwxr-x 1 seluser root 4096 Nov 24 15:27 css
drwxrwxr-x 1 seluser root 4096 Nov 24 15:27 js
drwxrwxr-x 1 seluser root 4096 Nov 24 15:27 img
drwxrwxr-x 5 seluser seluser 4096 Dec 5 01:56 videos
-rwxrw-r-- 1 seluser seluser 3420 Dec 6 07:00 nginx.conf.bak
-rwxrw-r-- 1 seluser seluser 3404 Dec 6 07:00 nginx.conf
-rwxrw-r-- 1 seluser seluser 627 Dec 6 07:00 error.html
drwxr-xr-x 2 seluser seluser 4096 Dec 6 07:00 logs
-rw-r--r-- 1 seluser seluser 1181 Dec 6 07:00 docker_info.txt
seluser@5ada56c01231:~$ pwd
/home/seluser
seluser@5ada56c01231:~$ sudo chown seluser:seluser wait-testingbot.sh
^C^C
seluser@5ada56c01231:~$ ^C
seluser@5ada56c01231:~$ sudo chown seluser:seluser wait-testingbot.sh
seluser@5ada56c01231:~$ sudo chown seluser:seluser wait-saucelabs.sh
^C^C
seluser@5ada56c01231:~$ sudo chown seluser:seluser wait-saucelabs.sh
seluser@5ada56c01231:~$
我试过的
- 如果我触摸一个新文件并运行 sudo chown,则没有问题。
- 如果我 CTRL+C 并重试,它将通过。
- 通过从 docker 安装开始使用完全相同的步骤,我可以在 aws 服务器上成功运行 zalenium。
- 我用谷歌搜索,但没有发现任何类似的问题。我知道这可能是由于环境问题,但我不知道如何排除故障。
提前感谢您的任何建议和帮助。