yaptide / ui

Yet Another Particle Transport IDE - frontend
https://yaptide.github.io/web_dev/
GNU General Public License v3.0
9 stars 4 forks source link

Node 18 causes docker compose hang #1573

Closed jagodek closed 2 months ago

jagodek commented 3 months ago

I couldn't run successfully docker compose on my machine. It would hang on npm ci. Only when I changed Node version to 19 it helped. I don't know what is incompatible, maybe my local npm (10.5.0).

grzanka commented 3 months ago

Can you reproduce the problem on gitlab / GitHub code spaces ?

grzanka commented 3 months ago

@jagodek what is your docker version ? In one of my machines I am running docker v25.0.2 and everything works fine, while on some other machine running docker v26.0.0 it seems that indeed building of ui gets stucked.

grzanka commented 3 months ago

Docker engine v26.0.0 was released on 2024-03-20, here are the release notes: https://docs.docker.com/engine/release-notes/26.0/

To check available versions: apt-cache madison docker-ce | awk '{ print $3 }'

To print which version we have: docker --version

grzanka commented 3 months ago

May it be an IPv6 issue ?

image

grzanka commented 3 months ago

Not an issue, seems to run now:

 => [yaptide_ui cert-gen 2/4] RUN apk add --no-cache openssl                                                                                                                      3.8s
 => [yaptide_ui stage-3 2/5] RUN rm /etc/nginx/conf.d/default.conf                                                                                                                2.7s
 => [yaptide_ui cert-gen 3/4] WORKDIR /certs                                                                                                                                      0.6s
 => [yaptide_ui cert-gen 4/4] RUN openssl req -new -newkey rsa:2048 -days 365 -nodes -x509     -subj "/C=US/ST=State/L=City/O=Organization/CN=localhost"     -keyout server.key   1.2s
 => [yaptide_ui stage-3 3/5] COPY --from=cert-gen /certs /etc/nginx/conf.d                                                                                                        0.4s
 => [yaptide_ui build  2/11] WORKDIR /usr/src/app                                                                                                                                 4.0s
 => [yaptide_ui build  3/11] COPY package.json package-lock.json ./                                                                                                               0.2s
 => [yaptide_ui build  4/11] RUN npm ci                                                                                                                                         104.3s
 => [yaptide_ui wheel-builder 2/3] COPY src/libs/converter/ .                                                                                                                     0.2s
 => [yaptide_ui wheel-builder 3/3] RUN pip install --no-cache-dir pip install "poetry ~= 1.8.2"     && poetry build --format wheel --no-ansi                                     29.6s
 => [yaptide_ui build  5/11] COPY . .                                                                                                                                             1.7s
 => [yaptide_ui build  6/11] RUN git config --global --add safe.directory /usr/src/app                                                                                            1.8s
 => [yaptide_ui build  7/11] RUN npm run identify                                                                                                                                 2.1s
 => [yaptide_ui build  8/11] COPY --from=wheel-builder dist/*.whl public/libs/converter/dist/                                                                                     0.2s
 => [yaptide_ui build  9/11] RUN echo "Deploying for prod"                                                                                                                        0.5s
 => [yaptide_ui build 10/11] RUN npx cross-env REACT_APP_DEPLOYMENT=prod npm run build                                                                                          362.1s
 => [yaptide_ui build 11/11] RUN npm run fix-web-dev                                                                                                                              1.7s
 => [yaptide_ui stage-3 4/5] COPY --from=build /usr/src/app/build /usr/share/nginx/html                                                                                           0.4s
 => [yaptide_ui stage-3 5/5] COPY nginx.conf /etc/nginx/conf.d/app.conf                                                                                                           0.1s
 => [yaptide_ui] exporting to image                                                                                                                                               0.9s
 => => exporting layers                                                                                                                                                           0.8s
 => => writing image sha256:c5fc1dd28be76a18f56a2e6eb1d72d69c20969a7a9e1c011ad16a8d908ce7e78                                                                                      0.0s
 => => naming to docker.io/library/yaptide_ui                                                                                                                                     0.0s
[+] Running 1/2
 ⠋ Network ui_default    Created                                                                                                                                                  1.0s 
 ✔ Container yaptide_ui  Started                                                                                                                                                  0.9s 

real    8m49.930s
user    0m11.022s
sys 0m8.213s
ubuntu@yaptide:~/ui$ docker --version
Docker version 26.0.0, build 2ae903e
ubuntu@yaptide:~/ui$ uname -a
Linux yaptide 5.15.0-101-generic #111-Ubuntu SMP Tue Mar 5 20:16:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@yaptide:~/ui$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

@jagodek do you have up to date OS ?

jagodek commented 3 months ago

@jagodek what is your docker version ? In one of my machines I am running docker v25.0.2 and everything works fine, while on some other machine running docker v26.0.0 it seems that indeed building of ui gets stucked.

Yes. I have docker 26. So I'll try downgrade it and then build.

grzanka commented 3 months ago

@jagodek what is your docker version ? In one of my machines I am running docker v25.0.2 and everything works fine, while on some other machine running docker v26.0.0 it seems that indeed building of ui gets stucked.

Yes. I have docker 26. So I'll try downgrade it and then build.

I'd suggest to remove (uninstall) docker desktop, use simply docker engine. Then run the UI build and monitor in another console running process (i.e. with htop). You should see if npm ci is using some CPU or not. The whole process may take up to ~10 min, so be patient