yarn with Docker and a bind-mounted volume.I created a simple repository that can be cloned: https://github.com/such/yarn-test.
This is simply the result of create-react-app plus some docker files.
The yarn version can be changed in the Dockerfile. I have been comparing 1.7.0 and 1.10.1.
An entrypoint script runs yarn install.
To reproduce:
$ docker build . -t yarn-test:latest
$ docker run --rm -it -v `pwd`:/app:delegated yarn-test:latest sh # using a delegated volume helps speeding up everything with both yarn versions
# once the initial install is done, directly in the docker container:
/app yarn add react-moment # or anything, really
According to my benchmark:
1.7.0:1.10.1:Note:
The performance issue does seem to exist without a bind-mounted volume. This can be tested by adding ADD . /app in the Dockerfile and removing the volume from the docker run command.
Just to be sure - the problems only appear when using Docker, is that correct?
Also, I'm not sure I understand your benchmark results. From what I see it looks good, right? 183s vs 154s and 130s vs 27s in 1.10.
Sorry I mixed up the versions. It should have been:
I'd be happy if someone else could confirm it though!
Also I've only been experiencing problems with Docker indeed.
We have also experience this issue while running yarn in the node:11.3 image in GitLab CI.
I'm experiencing the same issue using the node-9:alpine image both locally and in the CI
It seems there are 4 minutes of silence between the line:
Done in xxx seconds
until the next line.
Anyone have any leads? yarn version? docker version?
Any update on this? I am experiencing pretty much what @oreporan describes with node:lts
I seem to still have the same issue in Yarn 1.22, it hangs a long time after installing and building packages.
Most helpful comment
I'm experiencing the same issue using the
node-9:alpineimage both locally and in the CIIt seems there are 4 minutes of silence between the line:
Done in xxx secondsuntil the next line.
Anyone have any leads? yarn version? docker version?