Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docker build is not successful. #1724

Closed
JUN-KOBAYASHI opened this issue May 16, 2023 · 1 comment
Closed

docker build is not successful. #1724

JUN-KOBAYASHI opened this issue May 16, 2023 · 1 comment
Assignees

Comments

@JUN-KOBAYASHI
Copy link
Contributor

JUN-KOBAYASHI commented May 16, 2023

docker build is not successful.

When I do a docker build using the dockerfile as of 2023.5.16, the following error occurs and I cannot build.

 => [17/24] RUN apt-get -y install --no-install-recommends gpg-agent   && gpg -k   && gpg --no-default-keyring -  11.6s
 => ERROR [18/24] RUN mkdir -p /etc/bzt.d   && echo '{"install-id": "Docker"}' > /etc/bzt.d/99-zinstallID.json     0.6s
------
 > [18/24] RUN mkdir -p /etc/bzt.d   && echo '{"install-id": "Docker"}' > /etc/bzt.d/99-zinstallID.json   && echo '{"settings": {"artifacts-dir": "/tmp/artifacts"}}' > /etc/bzt.d/90-artifacts-dir.json   && cp `python3 -c "import bzt; print('{}/resources/chrome_launcher.sh'.format(bzt.__path__[0]))"`     /opt/google/chrome/google-chrome   && bzt -install-tools -v   && google-chrome-stable --version && firefox --version && dotnet --version | head -1:
#0 0.538 Traceback (most recent call last):
#0 0.538   File "<string>", line 1, in <module>
#0 0.538 ModuleNotFoundError: No module named 'bzt'
#0 0.542 cp: missing destination file operand after '/opt/google/chrome/google-chrome'
#0 0.542 Try 'cp --help' for more information.
------
Dockerfile:59
--------------------
  58 |     # auto installable tools
  59 | >>> RUN mkdir -p /etc/bzt.d \
  60 | >>>   && echo '{"install-id": "Docker"}' > /etc/bzt.d/99-zinstallID.json \
  61 | >>>   && echo '{"settings": {"artifacts-dir": "/tmp/artifacts"}}' > /etc/bzt.d/90-artifacts-dir.json \
  62 | >>>   && cp `python3 -c "import bzt; print('{}/resources/chrome_launcher.sh'.format(bzt.__path__[0]))"` \
  63 | >>>     /opt/google/chrome/google-chrome \
  64 | >>>   && bzt -install-tools -v \
  65 | >>>   && google-chrome-stable --version && firefox --version && dotnet --version | head -1
  66 |
--------------------
ERROR: failed to solve: process "/bin/sh -c mkdir -p /etc/bzt.d   && echo '{\"install-id\": \"Docker\"}' > /etc/bzt.d/99-zinstallID.json   && echo '{\"settings\": {\"artifacts-dir\": \"/tmp/artifacts\"}}' > /etc/bzt.d/90-artifacts-dir.json   && cp `python3 -c \"import bzt; print('{}/resources/chrome_launcher.sh'.format(bzt.__path__[0]))\"`     /opt/google/chrome/google-chrome   && bzt -install-tools -v   && google-chrome-stable --version && firefox --version && dotnet --version | head -1" did not complete successfully: exit code: 1

environment

Windows10Pro + WSL2 + Ubuntu 20.04 LTS

WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2965

Commands executed

  1. git clone https://github.com/Blazemeter/taurus.git
  2. cd taurus
  3. docker build -t mytaurus ./

Other information

Comment out "bzt -install-tools -v " to build the Docker image
Running "bzt -install-tools -v" manually in that image will produce the following error

ver. 1.16.19

[2023-05-22 07:10:15,517 DEBUG root] Exception: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/bzt/cli.py", line 679, in main
    code = executor.perform(parsed_configs)
  File "/usr/local/lib/python3.9/dist-packages/bzt/cli.py", line 288, in perform
    for module_name in sys.modules:
RuntimeError: dictionary changed size during iteration

Cause

The problem is caused by overriding the module_name variable in a function that logs details of missing versions of imported modules in the following PR.

PR:write interpreter details into bzt.log (#1416)

To build Docker.

RUN $PIP_INSTALL chardet
RUN $PIP_INSTALL bzt==1.16.18

You need to install a version of bzt that does not contain the relevant PR.

@matus-gazo
Copy link
Contributor

Fixed with attached PR

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants