Docker 部署失败
Completed执行 ./update_front.sh 报错
"docker stop" requires at least 1 argument.
See 'docker stop --help'.Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
Stop one or more running containers
"docker rm" requires at least 1 argument.
See 'docker rm --help'.Usage: docker rm [OPTIONS] CONTAINER [CONTAINER...]
Remove one or more containers
"docker rmi" requires at least 1 argument.
See 'docker rmi --help'.Usage: docker rmi [OPTIONS] IMAGE [IMAGE...]
Remove one or more images
[+] Building 40.0s (13/15)
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 465B 0.0s
=> [internal] load metadata for docker.io/library/nginx:stable 0.0s
=> [internal] load metadata for docker.io/library/node:17.8-buster 0.0s
=> [build 1/5] FROM docker.io/library/node:17.8-buster 0.9s
=> [internal] load build context 0.2s
=> => transferring context: 1.45MB 0.1s
=> [stage 1/5] FROM docker.io/library/nginx:stable 0.7s
=> [stage 2/5] ADD nginx.conf /etc/nginx/nginx.conf 0.2s
=> [build 2/5] WORKDIR /app 0.1s
=> [stage 3/5] ADD default.conf /etc/nginx/conf.d/default.conf 0.1s
=> [build 3/5] ADD front_page/ . 0.4s
=> [build 4/5] RUN npm install 27.1s
=> ERROR [build 5/5] RUN npm run build 11.5s
------
> [build 5/5] RUN npm run build:
#0 1.052
#0 1.052 > demo-web@0.0.1 build
#0 1.052 > vite build
#0 1.052
#0 1.642 vite v2.7.10 building for production...
#0 1.773 transforming...
#0 10.92 [@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead.
#0 10.92
#0 10.92 [@vue/compiler-sfc] ::v-deep usage as a combinator has been deprecated. Use :deep(<inner-selector>) instead.
#0 10.92
#0 11.34 ✓ 462 modules transformed.
#0 11.34 [vite:eslint]
#0 11.34 /app/src/components/g-map/use-drone-control-ws-event.ts
#0 11.34 74:30 error Unnecessary return statement no-useless-return
#0 11.34
#0 11.34 ✖ 1 problem (1 error, 0 warnings)
#0 11.34
#0 11.34 file: /app/src/components/g-map/use-drone-control-ws-event.ts
#0 11.34 error during build:
#0 11.34 Error:
#0 11.34 /app/src/components/g-map/use-drone-control-ws-event.ts
#0 11.34 74:30 error Unnecessary return statement no-useless-return
#0 11.34
#0 11.34 ✖ 1 problem (1 error, 0 warnings)
#0 11.34
#0 11.34 at error (/app/node_modules/rollup/dist/shared/rollup.js:159:30)
#0 11.34 at throwPluginError (/app/node_modules/rollup/dist/shared/rollup.js:21818:12)
#0 11.34 at Object.error (/app/node_modules/rollup/dist/shared/rollup.js:22544:20)
#0 11.34 at Object.error (/app/node_modules/rollup/dist/shared/rollup.js:21995:42)
#0 11.34 at Object.transform (/app/node_modules/vite-plugin-eslint/dist/index.js:87:14)
#0 11.34 at processTicksAndRejections (node:internal/process/task_queues:96:5)
#0 11.34 at async transform (/app/node_modules/rollup/dist/shared/rollup.js:21965:16)
#0 11.34 at async ModuleLoader.addModuleSource (/app/node_modules/rollup/dist/shared/rollup.js:22191:30)
#0 11.34 [!] Error: unfinished hook action(s) on exit:
#0 11.34 (vite:esbuild) transform "/app/src/components/g-map/use-drone-control.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/ant-design-vue/es/_util/util.js"
#0 11.34 (vite:vue) transform "/app/src/components/g-map/DroneControlPopover.vue"
#0 11.34 (vite:load-fallback) load "/app/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js"
#0 11.34 (vite:vue) transform "/app/src/components/g-map/DroneControlInfoPanel.vue"
#0 11.34 (vite:load-fallback) load "/app/node_modules/ant-design-vue/es/_util/supportsPassive.js"
#0 11.34 (vite:esbuild) transform "/app/src/api/drone-control/drone.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/ant-design-vue/es/anchor/context.js"
#0 11.34 (vite:esbuild) transform "/app/src/types/drone-control.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/lodash-es/isPlainObject.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/ant-design-vue/es/_util/isValid.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/ant-design-vue/es/vc-util/warning.js"
#0 11.34 (vite:esbuild) transform "/app/src/api/http/type.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/CloseOutlined.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/CheckCircleOutlined.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/ExclamationCircleOutlined.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/ant-design-vue/es/popconfirm/style/css.js"
#0 11.34 (vite:css) transform "/app/src/components/devices/DeviceFirmwareStatus.vue?vue&type=style&index=0&scoped=true&lang.scss"
#0 11.34 (vite:load-fallback) load "/app/src/utils/constants.ts"
#0 11.34 (vite:load-fallback) load "/app/src/types/airport-tsa.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/InfoCircleOutlined.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/CloseCircleOutlined.js"
#0 11.34 (vite:css) transform "/app/src/components/devices/device-upgrade/DeviceFirmwareUpgrade.vue?vue&type=style&index=0&scoped=true&lang.scss"
#0 11.34 (vite:load-fallback) load "/app/src/api/device-upgrade/index.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/CheckCircleFilled.js"
#0 11.34 (vite:esbuild) transform "/app/src/websocket/index.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/ExclamationCircleFilled.js"
#0 11.34 (vite:esbuild) transform "/app/src/websocket/util/config.ts"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/InfoCircleFilled.js"
#0 11.34 (vite:load-fallback) load "/app/node_modules/@ant-design/icons-vue/es/icons/CloseCircleFilled.js"
#0 11.34
------
Dockerfile:9
--------------------
7 | RUN npm install
8 |
9 | >>> RUN npm run build
10 |
11 |
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
Please sign in to leave a comment.
Comments
1 comment