Skip to content

[Win10]docker build 报错 #6

@HyperClockUp

Description

@HyperClockUp

复现环境

  • 系统:Win10
  • shell:git-bash.exe

其他

由于git-bash的环境中不存在wgetsudo

  • 下载了最新的wget到系统环境变量
  • 去掉build-injector-box.sh中的sudo

操作步骤

  1. git clone 项目
  2. 修改build-injector-box.sh中的wechat_version为3.9.5.81injector_name为wxhelper
  3. 右键项目根目录打开git-bash,执行chmod + x ./build-injector-box.sh
  4. 执行./build-injector-box.sh
  5. 报错如下
#6 [2/6] COPY wechat-box/root/ /
#6 DONE 0.9s
#7 [3/6] RUN bash -c 'nohup /entrypoint.sh 2>&1 &' && sleep 5 && /payloads.sh     && sudo rm /tmp/.X0-lock
#7 0.327 + RUN_XTERM=no
#7 0.327 + case $RUN_XTERM in
#7 0.327 + sudo rm -f /etc/supervisord.d/xterm.conf
#7 0.338 + exec sudo -E bash -c 'supervisord -c /etc/supervisord.conf -l /var/log/supervisord.log'
#7 0.450 2024-01-18 08:54:18,592 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
#7 0.450 2024-01-18 08:54:18,592 INFO Included extra file "/etc/supervisord.d/fluxbox.conf" during parsing
#7 0.450 2024-01-18 08:54:18,592 INFO Included extra file "/etc/supervisord.d/websockify.conf" during parsing
#7 0.450 2024-01-18 08:54:18,592 INFO Included extra file "/etc/supervisord.d/x11vnc.conf" during parsing
#7 0.450 2024-01-18 08:54:18,592 INFO Included extra file "/etc/supervisord.d/xvfb.conf" during parsing
#7 0.453 2024-01-18 08:54:18,594 INFO supervisord started with pid 12
#7 1.455 2024-01-18 08:54:19,596 INFO spawned: 'fluxbox' with pid 13
#7 1.456 2024-01-18 08:54:19,597 INFO spawned: 'websockify' with pid 14
#7 1.457 2024-01-18 08:54:19,598 INFO spawned: 'x11vnc' with pid 15
#7 1.458 2024-01-18 08:54:19,600 INFO spawned: 'xvfb' with pid 16
#7 2.473 2024-01-18 08:54:20,614 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
#7 2.473 2024-01-18 08:54:20,614 INFO success: websockify entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
#7 2.473 2024-01-18 08:54:20,614 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
#7 2.473 2024-01-18 08:54:20,615 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
#7 5.327 /usr/bin/env: ‘bash\r’: No such file or directory
#7 ERROR: process "/bin/sh -c bash -c 'nohup /entrypoint.sh 2>&1 &' && sleep 5 && /payloads.sh     && sudo rm /tmp/.X0-lock" did not complete successfully: exit code: 127
------
 > [3/6] RUN bash -c 'nohup /entrypoint.sh 2>&1 &' && sleep 5 && /payloads.sh     && sudo rm /tmp/.X0-lock:
0.453 2024-01-18 08:54:18,594 INFO supervisord started with pid 12
1.455 2024-01-18 08:54:19,596 INFO spawned: 'fluxbox' with pid 13
1.456 2024-01-18 08:54:19,597 INFO spawned: 'websockify' with pid 14
1.457 2024-01-18 08:54:19,598 INFO spawned: 'x11vnc' with pid 15
1.458 2024-01-18 08:54:19,600 INFO spawned: 'xvfb' with pid 16
2.473 2024-01-18 08:54:20,614 INFO success: fluxbox entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2.473 2024-01-18 08:54:20,614 INFO success: websockify entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2.473 2024-01-18 08:54:20,614 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2.473 2024-01-18 08:54:20,615 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
6.327 /usr/bin/env: ‘bash\r’: No such file or directory
------
Dockerfile:4
--------------------
   3 |     # init wechat-box with GUI
   4 | >>> RUN bash -c 'nohup /entrypoint.sh 2>&1 &' && sleep 5 && /payloads.sh \
   5 | >>>     && sudo rm /tmp/.X0-lock
   6 |     # clear payloads
--------------------
ERROR: failed to solve: process "/bin/sh -c bash -c 'nohup /entrypoint.sh 2>&1 &' && sleep 5 && /payloads.sh     && sudo rm /tmp/.X0-lock" did not complete successfully: exit code: 127

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions