github-copilot-resources / copilot-metrics-viewer

Tool to visualize the Copilot metrics provided via the Copilot Business Metrics API (current in public beta)
https://copilot-metrics-viewer-gthcc5cmd9ebf2ff.westeurope-01.azurewebsites.net/
MIT License
288 stars 142 forks source link

Docker not working #109

Open nur-sseredenko opened 1 day ago

nur-sseredenko commented 1 day ago

Hi! I get an error when running Docker container build. Maybe someone can help me?

WM: Operating System: Debian GNU/Linux 12 (bookworm) Kernel: Linux 6.1.0-25-amd64 User: root

root@node1:~/copilot-metrics-viewer# docker build -t copilot-metrics-viewer .
[+] Building 1.5s (12/16)                                                                                                                                                      docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                     0.0s
 => => transferring dockerfile: 570B                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/library/nginx:1.27                                                                                                                            0.7s
 => [internal] load metadata for docker.io/library/node:22                                                                                                                               0.7s
 => [internal] load .dockerignore                                                                                                                                                        0.0s
 => => transferring context: 197B                                                                                                                                                        0.0s
 => [build-stage 1/6] FROM docker.io/library/node:22@sha256:de4c8be8232b7081d8846360d73ce6dbff33c6636f2259cd14d82c0de1ac3ff2                                                             0.0s
 => CACHED [production-stage 1/5] FROM docker.io/library/nginx:1.27@sha256:28402db69fec7c17e179ea87882667f1e054391138f77ffaf0c3eb388efc3ffb                                              0.0s
 => [internal] load build context                                                                                                                                                        0.0s
 => => transferring context: 3.63kB                                                                                                                                                      0.0s
 => CACHED [build-stage 2/6] WORKDIR /app                                                                                                                                                0.0s
 => CACHED [build-stage 3/6] COPY package*.json ./                                                                                                                                       0.0s
 => CACHED [build-stage 4/6] RUN npm install                                                                                                                                             0.0s
 => CACHED [build-stage 5/6] COPY . .                                                                                                                                                    0.0s
 => ERROR [build-stage 6/6] RUN npm run build                                                                                                                                            0.8s
------
 > [build-stage 6/6] RUN npm run build:
0.348
0.348 > copilot-metrics-viewer@1.8.0 build
0.348 > vue-cli-service build
0.348
0.721  ERROR  Error loading vue.config.js:
0.722  ERROR  TypeError: defineConfig is not a function
0.722 TypeError: defineConfig is not a function
0.722     at Object.<anonymous> (/app/vue.config.js:2:18)
0.722     at Module._compile (node:internal/modules/cjs/loader:1546:14)
0.722     at Object..js (node:internal/modules/cjs/loader:1689:10)
0.722     at Module.load (node:internal/modules/cjs/loader:1318:32)
0.722     at Function._load (node:internal/modules/cjs/loader:1128:12)
0.722     at TracingChannel.traceSync (node:diagnostics_channel:315:14)
0.722     at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
0.722     at Module.require (node:internal/modules/cjs/loader:1340:12)
0.722     at require (node:internal/modules/helpers:141:16)
0.722     at Service.loadUserOptions (/app/node_modules/@vue/cli-service/lib/Service.js:283:22)
------
Dockerfile:7
--------------------
   5 |     RUN npm install
   6 |     COPY . .
   7 | >>> RUN npm run build
   8 |
   9 |     # Stage 2: Serve the application with Nginx
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
karpikpl commented 7 hours ago

@nur-sseredenko I think it's the same issue as #106 - can you check?