alexei-led / pumba

Chaos testing, network emulation, and stress testing tool for containers
Apache License 2.0
2.75k stars 193 forks source link

Error during docker build on Windows 11 #244

Open amias-channer opened 1 year ago

amias-channer commented 1 year ago

Hello All ,

Thanks for writing and sharing pumba , very much appreciated :)

I am having trouble building the docker image on Wndows 11

I download and build with these commands :

git clone git@github.com:alexei-led/pumba.git cd pumba docker build -t pumba -f docker/Dockerfile .

docker gets busy pulling in the layers and it all looks good until I get this output

19 9.970 level=warning msg="[runner] Can't run linter goanalysis_metalinter: gci: 4:13: expected ';', found \"math/rand\" (and 10 more errors)"

19 9.970 level=info msg="[runner] processing took 2.466µs with stages: max_same_issues: 414ns, skip_dirs: 407ns, nolint: 279ns, max_from_linter: 181ns, uniq_by_line: 139ns, cgo: 136ns, path_prettifier: 132ns, filename_unadjuster: 131ns, autogenerated_exclude: 120ns, skip_files: 118ns, sort_results: 44ns, source_code: 44ns, path_shortener: 43ns, exclude-rules: 40ns, diff: 40ns, exclude: 40ns, max_per_file_from_linter: 40ns, identifier_marker: 40ns, severity-rules: 39ns, path_prefixer: 39ns"

19 9.970 level=info msg="[runner] linters took 4.08231213s with stages: goanalysis_metalinter: 4.082266s"

19 9.970 level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: gci: 4:13: expected ';', found \"math/rand\" (and 10 more errors)\n\n"

19 9.970 level=info msg="Memory: 44 samples, avg is 398.7MB, max is 546.5MB"

19 9.970 level=info msg="Execution took 4.222525474s"

19 9.991 make: *** [Makefile:123: lint] Error 3


executor failed running [/bin/sh -c if [ -z "$SKIP_TESTS" ] || [ "$SKIP_TESTS" = false ]; then make lint test-coverage; fi]: exit code: 2

It looks like one of the upstream go dependencies is no longer passing the linter checks, i really don't know go enough to fix it myself does anyone have any ideas ? could a version be rolled back to prevent this ?

Cheers Amias

alexei-led commented 1 year ago

Try running the following command:

DOCKER_BUILDKIT=1 docker build -t pumba -f docker/Dockerfile --build-arg TARGETOS=linux --build-arg TARGETARCH=amd64 .