Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

The COPY and WORKDIR commands in docker build take long randomly #2709

Open
3 tasks done
microyahoo opened this issue Sep 24, 2024 · 0 comments
Open
3 tasks done

The COPY and WORKDIR commands in docker build take long randomly #2709

microyahoo opened this issue Sep 24, 2024 · 0 comments

Comments

@microyahoo
Copy link

microyahoo commented Sep 24, 2024

Contributing guidelines

I've found a bug and checked that ...

  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

The COPY command in docker build takes long occasionally like below. Most of the time, it only takes three to four minutes to complete, but sometimes it takes more than half an hour. According to monitoring from Node Exporter, the CPU and memory are sufficient, and the disk I/O wait doesn't seem too high. I'm not sure why it takes so long.

#10 [stage-1 2/7] RUN rm /etc/nginx/conf.d/default.conf
#10 ...

#11 [build  3/14] COPY ./package.json ./package.json
#11 DONE 204.5s

#10 [stage-1 2/7] RUN rm /etc/nginx/conf.d/default.conf
#10 ...

#12 [build  4/14] COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
#12 ...

#10 [stage-1 2/7] RUN rm /etc/nginx/conf.d/default.conf
#10 DONE 349.6s

#13 [stage-1 3/7] WORKDIR /code
#13 ...

#12 [build  4/14] COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
#12 DONE 208.0s

#14 [build  5/14] COPY ./.npmrc ./.npmrc
#14 ...

#13 [stage-1 3/7] WORKDIR /code
#13 DONE 89.3s

#14 [build  5/14] COPY ./.npmrc ./.npmrc
#14 DONE 78.9s
...
#17 [build  8/14] COPY ./tsconfig.json ./tsconfig.json                      
#17 DONE 78.9s                                                              
                                                                            
#18 [build  9/14] COPY ./uno.config.ts ./uno.config.ts                      
#18 DONE 119.6s                                                                                                                                          
                                                                            
#19 [build 10/14] COPY ./rsbuild.config.ts ./rsbuild.config.ts              
#19 DONE 0.0s                                                                                                                                            
                                                                                                                                                         
#20 [build 11/14] COPY ./public ./public                                                                                                                 
#20 DONE 0.0s                                                                                                                                            
                                                                                                                                                         
#21 [build 12/14] COPY ./src ./src                                                                                                                       
#21 DONE 0.7s                                                                                                                                            
                                                                                                                                                         
#22 [build 13/14] COPY ./uno.config.ts ./uno.config.ts                                                                                                   
#22 DONE 0.0s

Expected behaviour

docker build should takes a very short time

Actual behaviour

docker build takes long

Buildx version

v0.13.1

Docker info

Client: Docker Engine - Community
 Version:    25.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.13.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.25.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 164
 Server Version: 25.0.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: e9e2c7707933f32aa891dda794a1df36a6ec7aee
 runc version: v1.1.13-0-g58aa9203-dirty
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.15.0-92-generic
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 128
 Total Memory: 125.7GiB
 Name: 10-3-9-20.maas
 ID: 91258706-8c95-4f4c-a701-1a8a03e204b2
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 34
  Goroutines: 92
  System Time: 2024-09-24T10:59:54.612760629Z
  EventsListeners: 0
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Builders list

root@10-3-9-20:/home/devops# docker buildx ls
NAME/NODE     DRIVER/ENDPOINT   STATUS    BUILDKIT   PLATFORMS
default*      docker                                 
 \_ default    \_ default       running   v0.12.5    linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386

Configuration

FROM node:16.20.2 as build

WORKDIR /code

COPY ./package.json ./package.json
COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
COPY ./.npmrc ./.npmrc

RUN npm i -g $(echo 'const package = require("./package.json"); console.log(package.packageManager)' | node) --registry=https://nexus.deeproute.ai/repository/npm/
RUN pnpm install

COPY ./tsconfig.json ./tsconfig.json
COPY ./uno.config.ts ./uno.config.ts
COPY ./rsbuild.config.ts ./rsbuild.config.ts

COPY ./public ./public
COPY ./src ./src
COPY ./uno.config.ts ./uno.config.ts

ENV NODE_OPTIONS="--max-old-space-size=4096"

ARG BUILD_REMOTE_ENTRY_HOST_NORTHSTAR
ARG BUILD_REMOTE_ENTRY_HOST_DEEKEEPER
ARG BUILD_REMOTE_ENTRY_HOST_PANGEA
ARG BUILD_REMOTE_ENTRY_HOST_DREAMS

ENV REMOTE_ENTRY_HOST_NORTHSTAR=$BUILD_REMOTE_ENTRY_HOST_NORTHSTAR
ENV REMOTE_ENTRY_HOST_DEEKEEPER=$BUILD_REMOTE_ENTRY_HOST_DEEKEEPER
ENV REMOTE_ENTRY_HOST_PANGEA=$BUILD_REMOTE_ENTRY_HOST_PANGEA
ENV REMOTE_ENTRY_HOST_DREAMS=$BUILD_REMOTE_ENTRY_HOST_DREAMS

RUN pnpm run build

FROM nginx:1.25.1

# remove default server at port 80
RUN rm /etc/nginx/conf.d/default.conf

WORKDIR /code

COPY --from=build /code/dist ./dist

# nginx image will inject env vars to tempaltes before nginx starts https://hub.docker.com/_/nginx
COPY ./config/nginx.conf.template /etc/nginx/templates/hurricane.conf.template

# run the script with docker entrypoint, which require x permission
COPY ./config/set_worker_processes.sh /docker-entrypoint.d/00-set-worker-processes.sh
RUN chmod +x /docker-entrypoint.d/00-set-worker-processes.sh

ARG BUILD_NODE_ENV
ARG BUILD_API_GATEWAY
ARG BUILD_API_CLEAR_GATEWAY

ENV NODE_ENV=${BUILD_NODE_ENV}
ENV API_GATEWAY=${BUILD_API_GATEWAY}
ENV API_CLEAR_GATEWAY=${BUILD_API_CLEAR_GATEWAY}

### northstar start
ARG BUILD_NORTHSTAR_FRONTEND_PORT
ARG BUILD_NORTHSTAR_BACKEND_HOST
ARG BUILD_WEBVIZ_BACKEND_HOST
ARG BUILD_DRPLATFORM_HOST
ARG BUILD_MAP_HOST
ARG BUILD_MAP_NAVINFO_HOST
ARG BUILD_Hurricane_Backend_Host

ENV NORTHSTAR_FRONTEND_PORT=$BUILD_NORTHSTAR_FRONTEND_PORT
ENV NORTHSTAR_BACKEND_HOST=$BUILD_NORTHSTAR_BACKEND_HOST
ENV WEBVIZ_BACKEND_HOST=$BUILD_WEBVIZ_BACKEND_HOST
ENV DRPLATFORM_HOST=$BUILD_DRPLATFORM_HOST
ENV MAP_HOST=$BUILD_MAP_HOST
ENV MAP_NAVINFO_HOST=$BUILD_MAP_NAVINFO_HOST
ENV Hurricane_Backend_Host=$BUILD_Hurricane_Backend_Host
### northstar end


### deekeeper start
ARG BUILD_API_DEEKEEPER_HOST
ENV API_DEEKEEPER_HOST=$BUILD_API_DEEKEEPER_HOST
### deekeeper end

### dreams start
ARG BUILD_API_DREAMS_HOST
ENV API_DREAMS_HOST=$BUILD_API_DREAMS_HOST
### dreams end

ENV PORT=3000

EXPOSE $PORT

# https://stackoverflow.com/questions/18861300
CMD ["nginx", "-g", "daemon off;"]

Build logs

## exceptional scenario

# build the final image # collapsed multi-line command
45:29
++ docker build -t reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe:1.0.1572104 -t reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe:latest --build-arg BUILD_API_GATEWAY=https://stg-mlp-api-gateway.srv.deeproute.cn --build-arg BUILD_NODE_ENV=test --build-arg BUILD_NORTHSTAR_BACKEND_HOST=https://stg-mlp-api-gateway.srv.deeproute.cn --build-arg BUILD_API_DEEKEEPER_HOST=http://stg-clearml-apiserver.srv.deeproute.cn --build-arg BUILD_API_DREAMS_HOST=https://stg-dreams-server.srv.deeproute.cn --build-arg BUILD_Hurricane_Backend_Host=https://stg-mlp-api-gateway.srv.deeproute.cn --build-arg BUILD_WEBVIZ_BACKEND_HOST=https://stg-mlp-api-gateway.srv.deeproute.cn --build-arg BUILD_DRPLATFORM_HOST=http://stg-drplatform-backend.deeproute.cn --build-arg BUILD_MAP_HOST=http://stg-mapping-task-server.deeproute.cn --build-arg BUILD_MAP_NAVINFO_HOST=http://stg-routing-server.srv.deeproute.cn --build-arg BUILD_REMOTE_ENTRY_HOST_NORTHSTAR=https://stg-mlp-northstar.srv.deeproute.cn --build-arg BUILD_REMOTE_ENTRY_HOST_DEEKEEPER=https://stg-deekeeper-fe.srv.deeproute.cn --build-arg BUILD_REMOTE_ENTRY_HOST_PANGEA=https://stg-pangea-fe.srv.deeproute.cn --build-arg BUILD_REMOTE_ENTRY_HOST_DREAMS=https://stg-dreams.srv.deeproute.cn --build-arg BUILD_REACT_APP_K8SENV=stg --progress plain .
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.74kB done
#1 DONE 0.0s
#2 [internal] load metadata for reg.deeproute.ai/deeproute-public/node:16.20.2
#2 ...
#3 [internal] load metadata for reg.deeproute.ai/deeproute-public/nginx:1.25.1
#3 DONE 0.4s
#2 [internal] load metadata for reg.deeproute.ai/deeproute-public/node:16.20.2
#2 DONE 0.4s
#4 [internal] load .dockerignore
#4 transferring context: 992B done
#4 DONE 0.0s
#5 [stage-1 1/7] FROM reg.deeproute.ai/deeproute-public/nginx:1.25.1@sha256:1bb5c4b86cb7c1e9f0209611dc2135d8a2c1c3a6436163970c99193787d067ea
#5 resolve reg.deeproute.ai/deeproute-public/nginx:1.25.1@sha256:1bb5c4b86cb7c1e9f0209611dc2135d8a2c1c3a6436163970c99193787d067ea 0.0s done
#5 sha256:1bb5c4b86cb7c1e9f0209611dc2135d8a2c1c3a6436163970c99193787d067ea 1.78kB / 1.78kB done
#5 sha256:cf707e2339551222cafe3bf835fddfb859f26bf59058b3487de2b7659309b6b7 0B / 625B 0.1s
#5 sha256:021283c8eb95be02b23db0de7f609d603553c6714785e7a673c6594a624ffbda 8.15kB / 8.15kB done
#5 sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151 0B / 29.12MB 0.1s
#5 sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5 0B / 41.46MB 0.1s
#5 sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151 4.53MB / 29.12MB 0.2s
#5 sha256:cf707e2339551222cafe3bf835fddfb859f26bf59058b3487de2b7659309b6b7 625B / 625B 0.2s done
#5 sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151 21.77MB / 29.12MB 0.3s
#5 sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5 13.12MB / 41.46MB 0.3s
#5 sha256:91bb7937700d7d3496cf43cb0012e5f818064fecb766bd01041db23c127ab219 0B / 959B 0.3s
#5 sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151 29.12MB / 29.12MB 0.5s
#5 sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5 28.31MB / 41.46MB 0.5s
#5 sha256:91bb7937700d7d3496cf43cb0012e5f818064fecb766bd01041db23c127ab219 959B / 959B 0.5s
#5 ...
#6 [internal] load build context
#6 transferring context: 20.16MB 0.4s done
#6 DONE 0.5s
#5 [stage-1 1/7] FROM reg.deeproute.ai/deeproute-public/nginx:1.25.1@sha256:1bb5c4b86cb7c1e9f0209611dc2135d8a2c1c3a6436163970c99193787d067ea
#5 sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151 29.12MB / 29.12MB 0.5s done
#5 sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5 41.46MB / 41.46MB 0.7s
#5 sha256:91bb7937700d7d3496cf43cb0012e5f818064fecb766bd01041db23c127ab219 959B / 959B 0.5s done
#5 extracting sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151
#5 sha256:4b962717ba558b7dfabe88c40e20ac86844b132015b66002deac49010cc96be1 367B / 367B 0.7s
#5 sha256:f46d7b05649a846d7e24418b6ecea3b1efbdac88d361631e849e9c41917ba776 0B / 1.21kB 0.7s
#5 sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5 41.46MB / 41.46MB 0.7s done
#5 sha256:4b962717ba558b7dfabe88c40e20ac86844b132015b66002deac49010cc96be1 367B / 367B 0.7s done
#5 sha256:f46d7b05649a846d7e24418b6ecea3b1efbdac88d361631e849e9c41917ba776 1.21kB / 1.21kB 0.8s done
#5 sha256:103501419a0aecf94398ffcc7404f22931d9b89bbb6021391c2cd4a286f37ca9 0B / 1.41kB 0.8s
#5 sha256:103501419a0aecf94398ffcc7404f22931d9b89bbb6021391c2cd4a286f37ca9 1.41kB / 1.41kB 1.0s done
#5 extracting sha256:faef57eae888cbe4a5613eca6741b5e48d768b83f6088858aee9a5a2834f8151 2.2s done
#5 extracting sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5
#5 extracting sha256:76579e9ed380849b4d22696f292770963b5ea917a45ef77336a1a0a782b410b5 1.2s done
#5 extracting sha256:cf707e2339551222cafe3bf835fddfb859f26bf59058b3487de2b7659309b6b7
#5 extracting sha256:cf707e2339551222cafe3bf835fddfb859f26bf59058b3487de2b7659309b6b7 done
#5 extracting sha256:91bb7937700d7d3496cf43cb0012e5f818064fecb766bd01041db23c127ab219 done
#5 extracting sha256:4b962717ba558b7dfabe88c40e20ac86844b132015b66002deac49010cc96be1 done
#5 extracting sha256:f46d7b05649a846d7e24418b6ecea3b1efbdac88d361631e849e9c41917ba776 done
#5 extracting sha256:103501419a0aecf94398ffcc7404f22931d9b89bbb6021391c2cd4a286f37ca9 done
#5 DONE 4.8s
#7 [build  1/14] FROM reg.deeproute.ai/deeproute-public/node:16.20.2@sha256:754f1419240757b029810b5886e7a73439d0f2fac6dfb7c03e7ca4652576b0e4
#7 resolve reg.deeproute.ai/deeproute-public/node:16.20.2@sha256:754f1419240757b029810b5886e7a73439d0f2fac6dfb7c03e7ca4652576b0e4 0.0s done
#7 sha256:ebdc80ddefea69fbfcb8c35654cfbda724860e6c7f7a1ede438e96fd6f03522f 7.23kB / 7.23kB done
#7 sha256:754f1419240757b029810b5886e7a73439d0f2fac6dfb7c03e7ca4652576b0e4 2.00kB / 2.00kB done
#7 sha256:d6b7393fb4f375905c31c483d81ce2a2905f88aba8cb198874da2b54035bc41d 50.50MB / 50.50MB 1.4s done
#7 sha256:df43ba252b5f813936a37cbf85494d91f16f450798f48e64a3cf44f647b128aa 17.58MB / 17.58MB 1.1s done
#7 sha256:a048fb9bf954361501d8453cecac1ffff71e6f3e803a6432d35d4ded91d067df 51.87MB / 51.87MB 1.7s done
#7 sha256:002a034b76fdcfb3a5899b0813f51c6ef8f1ce91224cdee90214d7bea1a19b2e 191.90MB / 191.90MB 3.3s done
#7 extracting sha256:d6b7393fb4f375905c31c483d81ce2a2905f88aba8cb198874da2b54035bc41d 3.3s done
#7 sha256:7a1878b1d9ebe3e4d100fa4cba5cd1a5a1228e477feebd7c10b88082538d4414 34.79MB / 34.79MB 2.2s done
#7 sha256:a9c19616351ea348fa65e68c7703de82b3cb742abcfb6b23b7ef99165271ec75 4.20kB / 4.20kB 1.8s done
#7 sha256:60495116cae5bb41b583f666b45f849d084e7294ea68b5935ba70897cfe1b91f 2.27MB / 2.27MB 2.0s done
#7 sha256:4cac635dde577ea332f246e8821493e1071c4e0de5f8de73e3a6888223000332 448B / 448B 2.3s done
#7 extracting sha256:df43ba252b5f813936a37cbf85494d91f16f450798f48e64a3cf44f647b128aa
#7 extracting sha256:df43ba252b5f813936a37cbf85494d91f16f450798f48e64a3cf44f647b128aa 0.5s done
#7 extracting sha256:a048fb9bf954361501d8453cecac1ffff71e6f3e803a6432d35d4ded91d067df
#7 extracting sha256:a048fb9bf954361501d8453cecac1ffff71e6f3e803a6432d35d4ded91d067df 2.6s done
#7 extracting sha256:002a034b76fdcfb3a5899b0813f51c6ef8f1ce91224cdee90214d7bea1a19b2e
#7 ...
#8 [stage-1 2/7] RUN rm /etc/nginx/conf.d/default.conf
#8 DONE 8.6s
#7 [build  1/14] FROM reg.deeproute.ai/deeproute-public/node:16.20.2@sha256:754f1419240757b029810b5886e7a73439d0f2fac6dfb7c03e7ca4652576b0e4
#7 ...
#9 [stage-1 3/7] WORKDIR /code
#9 ...
#7 [build  1/14] FROM reg.deeproute.ai/deeproute-public/node:16.20.2@sha256:754f1419240757b029810b5886e7a73439d0f2fac6dfb7c03e7ca4652576b0e4
#7 extracting sha256:002a034b76fdcfb3a5899b0813f51c6ef8f1ce91224cdee90214d7bea1a19b2e 6.7s done
#7 extracting sha256:a9c19616351ea348fa65e68c7703de82b3cb742abcfb6b23b7ef99165271ec75 done
#7 extracting sha256:7a1878b1d9ebe3e4d100fa4cba5cd1a5a1228e477feebd7c10b88082538d4414 1.4s done
#7 extracting sha256:60495116cae5bb41b583f666b45f849d084e7294ea68b5935ba70897cfe1b91f
#7 extracting sha256:60495116cae5bb41b583f666b45f849d084e7294ea68b5935ba70897cfe1b91f 0.2s done
#7 extracting sha256:4cac635dde577ea332f246e8821493e1071c4e0de5f8de73e3a6888223000332
#7 extracting sha256:4cac635dde577ea332f246e8821493e1071c4e0de5f8de73e3a6888223000332 done
#7 DONE 21.3s
#9 [stage-1 3/7] WORKDIR /code
#9 ...
#10 [build  2/14] WORKDIR /code
#10 ...
#9 [stage-1 3/7] WORKDIR /code
#9 DONE 32.1s
#10 [build  2/14] WORKDIR /code
#10 DONE 25.6s
#11 [build  3/14] COPY ./package.json ./package.json
#11 DONE 2.1s
#12 [build  4/14] COPY ./pnpm-lock.yaml ./pnpm-lock.yaml
#12 DONE 0.7s
#13 [build  5/14] COPY ./.npmrc ./.npmrc
#13 DONE 0.0s
#14 [build  6/14] RUN npm i -g $(echo 'const package = require("./package.json"); console.log(package.packageManager)' | node) --registry=https://nexus.deeproute.ai/repository/npm/
#14 1.801 
#14 1.801 added 1 package in 1s
#14 1.801 
#14 1.801 1 package is looking for funding
#14 1.801   run `npm fund` for details
#14 1.802 npm notice 
#14 1.802 npm notice New major version of npm available! 8.19.4 -> 10.8.3
#14 1.802 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.8.3>
#14 1.802 npm notice Run `npm install -g npm@10.8.3` to update!
#14 1.802 npm notice 
#14 DONE 5.5s
#15 [build  7/14] RUN pnpm install
#15 0.954 Lockfile is up to date, resolution step is skipped
#15 1.104 Progress: resolved 1, reused 0, downloaded 0, added 0
#15 13.00 Packages: +974
#15 13.00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#15 13.04 Progress: resolved 974, reused 0, downloaded 0, added 0
#15 13.20 
#15 13.20    ╭──────────────────────────────────────────────────────────────────╮
#15 13.20    │                                                                  │
#15 13.20    │                Update available! 8.14.1 → 9.11.0.                │
#15 13.20    │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v9.11.0   │
#15 13.20    │                Run "pnpm add -g pnpm" to update.                 │
#15 13.20    │                                                                  │
#15 13.20    │      Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
#15 13.20    │                                                                  │
#15 13.20    ╰──────────────────────────────────────────────────────────────────╯
#15 13.20 
#15 14.87 Progress: resolved 974, reused 0, downloaded 1, added 0
#15 18.29 Progress: resolved 974, reused 0, downloaded 110, added 20
#15 19.38 Progress: resolved 974, reused 0, downloaded 132, added 110
#15 21.09 Progress: resolved 974, reused 0, downloaded 244, added 223
#15 22.50 Progress: resolved 974, reused 0, downloaded 352, added 325
#15 24.00 Progress: resolved 974, reused 0, downloaded 450, added 440
#15 25.39 Progress: resolved 974, reused 0, downloaded 541, added 532
#15 26.58 Progress: resolved 974, reused 0, downloaded 671, added 628
#15 27.91 Progress: resolved 974, reused 0, downloaded 816, added 806
#15 28.91 Progress: resolved 974, reused 0, downloaded 937, added 932
#15 29.91 Progress: resolved 974, reused 0, downloaded 967, added 964
#15 30.92 Progress: resolved 974, reused 0, downloaded 969, added 968
#15 31.92 Progress: resolved 974, reused 0, downloaded 972, added 971
#15 32.92 Progress: resolved 974, reused 0, downloaded 973, added 971
#15 33.92 Progress: resolved 974, reused 0, downloaded 974, added 972
#15 34.93 Progress: resolved 974, reused 0, downloaded 974, added 973
#15 40.30 Progress: resolved 974, reused 0, downloaded 974, added 974
#15 40.30 Progress: resolved 974, reused 0, downloaded 974, added 974, done
#15 40.85 .../core-js@3.37.1/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: The project needs your help! Please consider supporting core-js:
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: > https://opencollective.com/core-js 
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: > https://patreon.com/zloirock 
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: > https://boosty.to/zloirock 
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: > bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz 
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: I highly recommend reading this: https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md 
#15 41.33 .../core-js@3.37.1/node_modules/core-js postinstall: Done
#15 41.93 .../esbuild@0.21.5/node_modules/esbuild postinstall$ node install.js
#15 42.49 .../esbuild@0.21.5/node_modules/esbuild postinstall: Done
#15 43.12 
#15 43.12 dependencies:
#15 43.12 + @ant-design/icons 5.3.7
#15 43.12 + @antv/layout 0.3.25
#15 43.12 + @antv/x6 2.18.1
#15 43.12 + @antv/x6-plugin-clipboard 2.1.6
#15 43.12 + @antv/x6-plugin-export 2.1.6
#15 43.12 + @antv/x6-plugin-history 2.2.3
#15 43.12 + @antv/x6-plugin-minimap 2.0.5
#15 43.12 + @antv/x6-plugin-scroller 2.0.9
#15 43.12 + @antv/x6-plugin-selection 2.1.7
#15 43.12 + @antv/x6-plugin-snapline 2.1.7
#15 43.12 + @antv/x6-react-shape 2.2.3
#15 43.12 + @sentry/react 8.30.0
#15 43.12 + @supercharge/promise-pool 2.4.0
#15 43.12 + @visactor/react-vchart 1.11.5
#15 43.12 + antd 5.19.3
#15 43.12 + axios 1.6.2
#15 43.12 + classnames 2.5.1
#15 43.12 + copy-to-clipboard 3.3.3
#15 43.12 + date-fns 2.30.0
#15 43.12 + dayjs 1.11.12
#15 43.12 + dexie 3.2.4
#15 43.12 + highlight.js 11.9.0
#15 43.12 + husky 8.0.3
#15 43.12 + immutable 4.3.4
#15 43.12 + lodash-es 4.17.21
#15 43.12 + lru-cache 7.18.3
#15 43.12 + mobx 6.11.0
#15 43.12 + mobx-react-lite 3.4.3
#15 43.12 + monaco-editor 0.37.1
#15 43.12 + prettier 2.8.8
#15 43.12 + react 18.3.1
#15 43.12 + react-dom 18.3.1
#15 43.12 + react-grid-layout 1.4.4
#15 43.12 + react-router-dom 6.24.1
#15 43.12 + react-virtuoso 4.3.11
#15 43.12 + recharts 2.9.2
#15 43.12 + rison-node 2.1.1
#15 43.12 + three 0.144.0
#15 43.12 + three-spritetext 1.8.1
#15 43.12 + uuid 9.0.1
#15 43.12 + valibot 0.31.0-rc.11
#15 43.12 + web-vitals 3.5.0
#15 43.12 
#15 43.12 devDependencies:
#15 43.12 + @rsbuild/core 1.0.1-beta.4
#15 43.12 + @rsbuild/plugin-react 1.0.1-beta.4
#15 43.12 + @rsbuild/plugin-sass 1.0.1-beta.4
#15 43.12 + @rsbuild/plugin-type-check 1.0.1-beta.4
#15 43.12 + @types/lodash-es 4.17.11
#15 43.12 + @types/node 16.18.61
#15 43.12 + @types/react 18.2.37
#15 43.12 + @types/react-csv 1.1.8
#15 43.12 + @types/react-dom 18.2.15
#15 43.12 + @types/react-grid-layout 1.3.5
#15 43.12 + @types/three 0.144.0
#15 43.12 + @types/uuid 9.0.8
#15 43.12 + @unocss/eslint-config 0.61.5
#15 43.12 + @unocss/postcss 0.61.5
#15 43.12 + eslint-config-react-app 7.0.1
#15 43.12 + lint-staged 15.1.0
#15 43.12 + sass 1.69.5
#15 43.12 + source-map-explorer 2.5.3
#15 43.12 + typescript 5.5.3
#15 43.12 + unocss 0.61.5
#15 43.12 
#15 43.16 
#15 43.16 > hurricane-fe@0.1.0 prepare /code
#15 43.16 > husky install
#15 43.16 
#15 43.70 fatal: not a git repository (or any of the parent directories): .git
#15 43.70 husky - git command not found, skipping install
#15 43.71 Done in 43.3s
#15 DONE 128.5s
#16 [build  8/14] COPY ./tsconfig.json ./tsconfig.json
#16 DONE 86.4s
#17 [build  9/14] COPY ./uno.config.ts ./uno.config.ts
#17 DONE 0.1s
#18 [build 10/14] COPY ./rsbuild.config.ts ./rsbuild.config.ts
#18 DONE 0.0s
#19 [build 11/14] COPY ./public ./public
#19 DONE 0.0s
#20 [build 12/14] COPY ./src ./src
#20 DONE 0.3s
#21 [build 13/14] COPY ./uno.config.ts ./uno.config.ts
#21 DONE 0.0s
#22 [build 14/14] RUN pnpm run build
#22 0.850 
#22 0.850 > hurricane-fe@0.1.0 build /code
#22 0.850 > rsbuild build
#22 0.850 
#22 1.219   Rsbuild v1.0.1-beta.4
#22 1.219 
#22 1.602 ┌─────────────────────────────┬──────────────────────────────────────────────┐
#22 1.602 │           (index)           │                    Values                    │
#22 1.602 ├─────────────────────────────┼──────────────────────────────────────────────┤
#22 1.602 │          NODE_ENV           │                 'production'                 │
#22 1.602 │ REMOTE_ENTRY_HOST_NORTHSTAR │ 'https://stg-mlp-northstar.srv.deeproute.cn' │
#22 1.602 │ REMOTE_ENTRY_HOST_DEEKEEPER │ 'https://stg-deekeeper-fe.srv.deeproute.cn'  │
#22 1.602 │  REMOTE_ENTRY_HOST_PANGEA   │   'https://stg-pangea-fe.srv.deeproute.cn'   │
#22 1.602 │  REMOTE_ENTRY_HOST_DREAMS   │    'https://stg-dreams.srv.deeproute.cn'     │
#22 1.602 └─────────────────────────────┴──────────────────────────────────────────────┘
#22 1.943 info    Type checker is enabled. It may take some time.
#22 61.69 ready   Compiled in 59.2 s (web)
#22 61.69 warn    Compile Warning: 
#22 61.69 File: consume shared module (default) @sentry/react@^8.30.0 (strict) (fallback: /code/node_modules/.pnpm/@sentry+react@8.30.0_react@18.3.1/node_modules/@sentry/react/build/esm/index.js):1:1
#22 61.69   ⚠ No version specified and unable to automatically determine one. No version in description file (usually package.json). Add version to description file /code/node_modules/.pnpm/@sentry+react@8.30.0_react@18.3.1/node_modules/@sentry/react/build/esm, or manually specify version in shared config. shared module @sentry/react -> /code/node_modules/.pnpm/@sentry+react@8.30.0_react@18.3.1/node_modules/@sentry/react/build/esm/index.js
#22 61.69 
#22 63.21 info    Production file sizes for web:
#22 63.21 
#22 63.21   File                                                          Size         Gzipped    
#22 63.21   dist/static/js/async/5369.c57a0f0c.js                         0.25 kB      0.19 kB
#22 63.21   dist/static/js/async/3225.2ae4b54e.js                         0.88 kB      0.52 kB
#22 63.21   dist/index.html                                               0.90 kB      0.51 kB
#22 63.21   dist/static/js/async/8857.234064a3.js                         1.1 kB       0.53 kB
#22 63.21   dist/static/js/async/8180.90957f7f.js                         2.3 kB       1.1 kB
#22 63.21   dist/static/js/async/2173.3b44f613.js                         3.4 kB       1.3 kB
#22 63.21   dist/static/js/async/5734.e35e8af9.js                         3.6 kB       1.3 kB
#22 63.21   dist/static/js/async/8784.1b10d11b.js                         3.9 kB       1.8 kB
#22 63.21   dist/static/js/async/7048.8ba8b788.js                         4.0 kB       1.8 kB
#22 63.21   dist/static/image/avatar.8ade8644.webp                        4.7 kB       4.8 kB
#22 63.21   dist/static/js/async/3167.d117abc6.js                         4.8 kB       1.7 kB
#22 63.21   dist/static/js/async/9724.61dadd73.js                         4.8 kB       1.7 kB
#22 63.21   dist/static/js/async/1983.8ffb7118.js                         4.9 kB       2.1 kB
#22 63.21   dist/static/js/async/2350.4666f541.js                         4.9 kB       2.1 kB
#22 63.21   dist/static/js/async/4302.579afdcf.js                         5.0 kB       1.9 kB
#22 63.21   dist/static/js/async/5602.c1765a7e.js                         5.5 kB       2.2 kB
#22 63.21   dist/static/js/async/4088.c4a9f4b7.js                         5.5 kB       2.0 kB
#22 63.21   dist/static/js/async/9350.e0075dce.js                         5.5 kB       2.0 kB
#22 63.21   dist/static/js/async/5366.16b2c97c.js                         6.6 kB       2.7 kB
#22 63.21   dist/static/js/async/6586.42675054.js                         7.0 kB       2.5 kB
#22 63.21   dist/static/js/async/7122.801b4b95.js                         7.0 kB       2.5 kB
#22 63.21   dist/static/js/async/44.beaf4687.js                           7.1 kB       3.0 kB
#22 63.21   dist/static/js/async/6005.eab66b7f.js                         7.2 kB       2.8 kB
#22 63.21   dist/static/js/async/1349.23edf8d6.js                         7.4 kB       2.7 kB
#22 63.21   dist/static/js/async/681.dd2ac773.js                          7.8 kB       2.5 kB
#22 63.21   dist/static/js/async/507.39e57995.js                          8.1 kB       3.3 kB
#22 63.21   dist/static/js/async/8869.d67165dc.js                         8.5 kB       2.3 kB
#22 63.21   dist/static/js/async/6406.1a679443.js                         8.9 kB       2.9 kB
#22 63.21   dist/static/js/async/9287.db6ed331.js                         8.9 kB       2.9 kB
#22 63.21   dist/static/js/async/1815.528738d4.js                         11.0 kB      3.3 kB
#22 63.21   dist/static/js/async/6169.e5780097.js                         11.0 kB      3.3 kB
#22 63.21   dist/static/js/async/9204.0133bba0.js                         12.7 kB      3.9 kB
#22 63.21   dist/static/js/async/8035.de4e92d3.js                         24.6 kB      6.5 kB
#22 63.21   dist/static/js/async/6797.769c19f9.js                         26.1 kB      6.5 kB
#22 63.21   dist/static/js/async/1054.cc7ba811.js                         29.3 kB      11.5 kB
#22 63.21   dist/static/image/graph-bg.ec21cee5.webp                      36.0 kB      36.0 kB
#22 63.21   dist/static/js/async/5297.37de64ca.js                         51.6 kB      16.8 kB
#22 63.21   dist/static/js/async/1069.6d87be5b.js                         57.5 kB      16.7 kB
#22 63.21   dist/static/js/async/1845.c035c26f.js                         59.6 kB      9.5 kB
#22 63.21   dist/static/js/async/4683.27c61b5b.js                         65.6 kB      18.0 kB
#22 63.21   dist/static/js/async/6336.d1b764cb.js                         66.6 kB      19.7 kB
#22 63.21   dist/static/js/async/8385.e8f7cf29.js                         73.5 kB      18.8 kB
#22 63.21   dist/static/font/Outfit-VariableFont_wght.d3b29ff7.ttf        75.9 kB      42.3 kB
#22 63.21   dist/static/js/async/757.2b65750d.js                          85.2 kB      30.2 kB
#22 63.21   dist/static/js/async/4309.1d40a169.js                         102.3 kB     22.1 kB
#22 63.21   dist/static/js/async/1417.1959e4e6.js                         109.1 kB     36.4 kB
#22 63.21   dist/static/css/async/3074.1fc4e9e3.css                       111.0 kB     24.8 kB
#22 63.21   dist/static/js/async/5295.2bce58d5.js                         342.6 kB     110.7 kB
#22 63.21   dist/static/js/index.e4d252b5.js                              389.1 kB     113.2 kB
#22 63.21   dist/static/js/async/5217.7df0a66d.js                         419.6 kB     117.8 kB
#22 63.21   dist/static/js/async/8469.09497c64.js                         486.2 kB     142.9 kB
#22 63.21   dist/static/js/async/9874.ba10d79e.js                         501.1 kB     121.5 kB
#22 63.21   dist/static/js/async/1126.44ff20f6.js                         602.1 kB     151.1 kB
#22 63.21   dist/static/js/async/3074.015052d3.js                         632.1 kB     174.6 kB
#22 63.21   dist/static/js/async/9025.42f9e297.js                         761.4 kB     169.6 kB
#22 63.21   dist/static/font/Inter-VariableFont_slnt,wght.1cccc37b.ttf    803.4 kB     421.0 kB
#22 63.21   dist/static/js/async/1669.96f8381c.js                         1342.1 kB    404.0 kB
#22 63.21   dist/static/js/async/9597.34e4d073.js                         2022.5 kB    530.0 kB
#22 63.21   dist/static/font/Source Han Sans CN Regular.d31c45a8.otf      8364.8 kB    7256.2 kB
#22 63.21   dist/static/font/Source Han Sans CN Bold.4278d4c3.otf         8608.2 kB    7533.1 kB
#22 63.21 
#22 63.21   Total size:  26435.0 kB
#22 63.21   Gzipped size:  17631.3 kB
#22 63.21 
#22 DONE 443.4s
#23 [stage-1 4/7] COPY --from=build /code/dist ./dist
#23 DONE 955.6s
#24 [stage-1 5/7] COPY ./config/nginx.conf.template /etc/nginx/templates/hurricane.conf.template
#24 DONE 122.9s
#25 [stage-1 6/7] COPY ./config/set_worker_processes.sh /docker-entrypoint.d/00-set-worker-processes.sh
#25 DONE 0.0s
#26 [stage-1 7/7] RUN chmod +x /docker-entrypoint.d/00-set-worker-processes.sh
#26 DONE 7.2s
#27 exporting to image
#27 exporting layers
#27 exporting layers 0.8s done
#27 writing image sha256:96287f015e813d242657663331a9b014f613505332bd750abb2bf4f396720d75 0.0s done
#27 naming to reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe:1.0.1572104 done
#27 naming to reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe:latest done
#27 DONE 0.9s
++ set +x
$ # upload to harbor # collapsed multi-line command
00:12
++ (( ++i ))
++ docker login -u devops -p [MASKED] reg.deeproute.ai
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
++ rc=0
++ '[' 0 -eq 0 ']'
++ echo 'docker login to reg.deeproute.ai success'
docker login to reg.deeproute.ai success
++ break
++ docker push reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe:1.0.1572104
The push refers to repository [reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe]
c72691165116: Preparing
2682f410b7f2: Preparing
a322efc7dd50: Preparing
f3b878e772c5: Preparing
d633ea478f19: Preparing
570a89f9148a: Preparing
3c9d04c9ebd5: Preparing
434c6a715c30: Preparing
9fdfd12bc85b: Preparing
f36897eea34d: Preparing
1998c5cd2230: Preparing
b821d93f6666: Preparing
24839d45ca45: Preparing
3c9d04c9ebd5: Waiting
570a89f9148a: Waiting
9fdfd12bc85b: Waiting
434c6a715c30: Waiting
b821d93f6666: Waiting
1998c5cd2230: Waiting
24839d45ca45: Waiting
f36897eea34d: Waiting
2682f410b7f2: Pushed
c72691165116: Pushed
d633ea478f19: Pushed
a322efc7dd50: Pushed
434c6a715c30: Layer already exists
3c9d04c9ebd5: Layer already exists
9fdfd12bc85b: Layer already exists
f36897eea34d: Layer already exists
1998c5cd2230: Layer already exists
b821d93f6666: Layer already exists
24839d45ca45: Layer already exists
570a89f9148a: Pushed
f3b878e772c5: Pushed
1.0.1572104: digest: sha256:b953dad87b7872aaf21294e18303ff5276d6832f3da9d814b9118a096920bc0e size: 3026
++ docker push reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe:latest
The push refers to repository [reg.deeproute.ai/deeproute-staging/ml-platform-hurricane-fe]
c72691165116: Preparing
2682f410b7f2: Preparing
a322efc7dd50: Preparing
f3b878e772c5: Preparing
d633ea478f19: Preparing
570a89f9148a: Preparing
3c9d04c9ebd5: Preparing
434c6a715c30: Preparing
9fdfd12bc85b: Preparing
f36897eea34d: Preparing
1998c5cd2230: Preparing
b821d93f6666: Preparing
24839d45ca45: Preparing
570a89f9148a: Waiting
434c6a715c30: Waiting
1998c5cd2230: Waiting
b821d93f6666: Waiting
9fdfd12bc85b: Waiting
24839d45ca45: Waiting
3c9d04c9ebd5: Waiting
f36897eea34d: Waiting
f3b878e772c5: Layer already exists
2682f410b7f2: Layer already exists
d633ea478f19: Layer already exists
c72691165116: Layer already exists
a322efc7dd50: Layer already exists
434c6a715c30: Layer already exists
9fdfd12bc85b: Layer already exists
570a89f9148a: Layer already exists
3c9d04c9ebd5: Layer already exists
f36897eea34d: Layer already exists
b821d93f6666: Layer already exists
1998c5cd2230: Layer already exists
24839d45ca45: Layer already exists
latest: digest: sha256:b953dad87b7872aaf21294e18303ff5276d6832f3da9d814b9118a096920bc0e size: 3026

Additional info

20240924-191600
20240924-191554

strace the process of buildx
strace.txt

@microyahoo microyahoo changed the title The COPY command in docker build takes long The COPY and WORKDIR command in docker build takes long randomly Sep 24, 2024
@microyahoo microyahoo changed the title The COPY and WORKDIR command in docker build takes long randomly The COPY and WORKDIR commands in docker build takes long randomly Oct 10, 2024
@microyahoo microyahoo changed the title The COPY and WORKDIR commands in docker build takes long randomly The COPY and WORKDIR commands in docker build take long randomly Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant