Docker Buildx hangs on Webpack
Issue is a bit random
This issue sadly is not really reproducable.
Sometimes with all caches cleared it works but sometimes not. (about 10% of the time it hangs til a full restart)
Buildx output looks suspicous:
[+] Building 10.1s (6/11)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [internal] load .dockerignore 0.9s
=> => transferring context: 35B 0.9s
=> [internal] load metadata for docker.io/library/node:16.3.0 0.6s
=> [internal] load metadata for docker.io/seekinnovation/ls-docker-builder:latest 0.0s
=> [stage-1 1/5] FROM docker.io/library/node:16.3.0@sha256:ca6daf1543242acb0ca59ff425509eab7defb9452f6ae07c156893db06c7a9a4 0.0s
=> [stage-0 1/2] FROM docker.io/seekinnovation/ls-docker-builder 0.5s
=> [stage-0 2/2] RUN yarn build api; NEXUS_SHOULD_EXIT_AFTER_GENERATE_ARTIFACTS="true" node ./dist/apps/api/main.js > /dev/null 91036.8s
=> => # yarn run v1.22.5
=> => # $ nx build api
So aparently after just 10 seconds the webpack task has already taken 91000 seconds???
(The build api task uses webpack under the hood)
Docker version
version output
Client: Docker Engine - Community
Version: 20.10.12
API version: 1.41
Go version: go1.16.12
Git commit: e91ed57
Built: Mon Dec 13 11:45:33 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.12
API version: 1.41 (minimum version 1.12)
Go version: go1.16.12
Git commit: 459d0df
Built: Mon Dec 13 11:43:41 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.12
GitCommit: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
runc:
Version: 1.0.2
GitCommit: v1.0.2-0-g52b36a2
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Further information
This issue first appeared after upgrading docker and my linux distro (was 20.10 ubuntu now is 21.10 ubuntu). Also cgroups 2 are new which has introduced some problems in old docker versions.
@Fibs7000 Would need a repro to be able to test on our side (Dockerfile, build command used and buildx/buildkit version). Thanks.
Might be a similar bug as https://github.com/docker/buildx/issues/556