收藏
回答

vsvode云服务本地调试?

 *  正在执行任务: docker build -f "Dockerfile" -t wxcloud_jiandan:latest . 


2024/01/04 10:34:58 http2: server: error reading preface from client //./pipe/docker_engine: file has already been closed

[+] Building 1.8s (13/13) FINISHED                                                                                                                                                                                docker:default

 => [internal] load .dockerignore                                                                                                                                                                                           0.0s

 => => transferring context: 2B                                                                                                                                                                                             0.0s

 => [internal] load build definition from Dockerfile                                                                                                                                                                        0.0s

 => => transferring dockerfile: 1.56kB                                                                                                                                                                                      0.0s

 => [internal] load metadata for docker.io/library/alpine:3.13                                                                                                                                                              1.6s

 => [1/8] FROM docker.io/library/alpine:3.13@sha256:469b6e04ee185740477efa44ed5bdd64a07bbdd6c7e5f5d169e540889597b911                                                                                                        0.0s

 => [internal] load build context                                                                                                                                                                                           0.1s

 => => transferring context: 218.69kB                                                                                                                                                                                       0.1s

 => CACHED [2/8] RUN apk add ca-certificates                                                                                                                                                                                0.0s

 => CACHED [3/8] RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tencent.com/g' /etc/apk/repositories && apk add --update --no-cache nodejs npm                                                                                0.0s 

 => CACHED [4/8] WORKDIR /app                                                                                                                                                                                               0.0s 

 => CACHED [5/8] COPY package*.json /app/                                                                                                                                                                                   0.0s 

 => CACHED [6/8] RUN npm config set registry https://mirrors.cloud.tencent.com/npm/                                                                                                                                         0.0s 

 => CACHED [7/8] RUN npm install                                                                                                                                                                                            0.0s 

 => CACHED [8/8] COPY . /app                                                                                                                                                                                                0.0s 

 => exporting to image                                                                                                                                                                                                      0.0s 

 => => exporting layers                                                                                                                                                                                                     0.0s 

 => => writing image sha256:5cc5c23f3b4ce8b86e1de45b351c06dcd0910d4288593327b64f53fd9da0170a                                                                                                                                0.0s 

 => => naming to docker.io/library/wxcloud_jiandan:latest                                                                                                                                                                   0.0s 


What's Next?

  1. Sign in to your Docker account → docker login

  2. View a summary of image vulnerabilities and recommendations → docker scout quickview

 *  终端将被任务重用,按任意键关闭。 


 *  正在执行任务: docker run --rm -t  --network wxcb0 --name wxcloud_jiandan -l role=container -l wxcloud=jiandan -l hostPort=27081 -l wxPort=27082 -p 127.0.0.1:27081:80/tcp -e 'MYSQL_USERNAME=' -e 'MYSQL_PASSWORD=' -e 'MYSQL_ADDRESS=' --cpus 1 -m 2GB --mount type=bind,source="C:\Users\Administrator\.wxcloudbase\.tencentcloudbase",target=/.tencentcloudbase,readonly wxcloud_jiandan:latest 



> wxcloudrun-express@1.0.0 start /app

> node index.js


(node:17) UnhandledPromiseRejectionWarning: SequelizeConnectionRefusedError: connect ECONNREFUSED 127.0.0.1:3306

    at ConnectionManager.connect (/app/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:92:17)

    at processTicksAndRejections (internal/process/task_queues.js:95:5)

    at async ConnectionManager._connect (/app/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:222:24)

    at async /app/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:174:32

    at async ConnectionManager.getConnection (/app/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:197:7)

    at async /app/node_modules/sequelize/lib/sequelize.js:305:26

    at async MySQLQueryInterface.tableExists (/app/node_modules/sequelize/lib/dialects/abstract/query-interface.js:102:17)

    at async Function.sync (/app/node_modules/sequelize/lib/model.js:939:21)

    at async init (/app/db.js:35:3)

    at async bootstrap (/app/index.js:68:3)

(Use `node --trace-warnings ...` to show where the warning was created)

(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

这个是vscode的终端文本

回答关注问题邀请回答
收藏
登录 后发表内容
问题标签