Open lyanlai opened 2 hours ago
看上去是安装的命令不可运行,大佬这个dockerfile这是最新的吗?获取node这些资源没啥问题,应该是安装的时候不能安装?我用的desktop.
docker build -t mychatbot . [+] Building 55.4s (11/11) FINISHED docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.14kB 0.0s => [internal] load metadata for docker.io/library/node:18 6.4s => [internal] load .dockerignore 0.0s => => transferring context: 280B 0.0s => [1/6] FROM docker.io/library/node:18@sha256:ddd173cd94537e155b378342 47.2s => => resolve docker.io/library/node:18@sha256:ddd173cd94537e155b3783420 0.0s => => sha256:ddd173cd94537e155b378342056e0968e8299eb3da9 6.41kB / 6.41kB 0.0s => => sha256:915f67036af49bad671aa4cbb853988d97fb89b24e1 2.49kB / 2.49kB 0.0s => => sha256:416ebe3d6a254ab6cebfa09550ffafd16a52ce55dc0 6.70kB / 6.70kB 0.0s => => sha256:eb173c1dbe92b367644a53adf5c004908921fa91 45.64MB / 45.64MB 43.3s => => sha256:59ee42d02ee5edca29b89e9d18b5bedd9400da38e1d 3.32kB / 3.32kB 0.9s => => sha256:f110c757afc5699d6587a989cc741d88e170d259506 1.25MB / 1.25MB 2.9s => => extracting sha256:59ee42d02ee5edca29b89e9d18b5bedd9400da38e1dcc0da 0.0s => => sha256:e3d8693bad2fd07287529dd2f1bc71d431ed97f061cc844 444B / 444B 1.2s => => extracting sha256:eb173c1dbe92b367644a53adf5c004908921fa91460c054f 3.4s => => extracting sha256:f110c757afc5699d6587a989cc741d88e170d259506ecd3b 0.1s => => extracting sha256:e3d8693bad2fd07287529dd2f1bc71d431ed97f061cc8440 0.0s => [internal] load build context 0.0s => => transferring context: 5.00kB 0.0s => [2/6] WORKDIR /app 0.8s => [3/6] COPY package.json pnpm-lock.yaml .npmrc ./ 0.0s => [4/6] COPY patches ./patches 0.0s => [5/6] RUN npm install -g 0.7s => [6/6] COPY . . 0.0s => exporting to image 0.1s => => exporting layers 0.0s => => writing image sha256:a59103dafa6f1ade0e660f8e2a377dcaaea8eb979ab27 0.0s => => naming to docker.io/library/mychatbot 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/ypjhfviy79euwl1ztg3x1919g
1 warning found (use docker --debug to expand):
SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "LOGIN_API_TOKEN") (line 21) lyan@macdeMacBook-Pro wechatbot-webhook-main % docker build -t mychatbot . [+] Building 335.8s (9/10) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.22kB 0.0s => [internal] load metadata for docker.io/library/node:18 2.9s => [internal] load .dockerignore 0.0s => => transferring context: 280B 0.0s => [1/6] FROM docker.io/library/node:18@sha256:ddd173cd94537e155b3783420 0.0s => [internal] load build context 0.0s => => transferring context: 5.12kB 0.0s => CACHED [2/6] WORKDIR /app 0.0s => CACHED [3/6] COPY package.json pnpm-lock.yaml .npmrc ./ 0.0s => CACHED [4/6] COPY patches ./patches 0.0s => ERROR [5/6] RUN npm install -g pnpm && pnpm install --production&& 332.8s
[5/6] RUN npm install -g pnpm && pnpm install --production&& pnpm store prune && npm uninstall pnpm -g: 332.7 npm error code ECONNRESET 332.7 npm error network aborted 332.7 npm error network This is a problem related to network connectivity. 332.7 npm error network In most cases you are behind a proxy or have bad network settings. 332.7 npm error network 332.7 npm error network If you are behind a proxy, please make sure that the 332.7 npm error network 'proxy' config is set properly. See: 'npm help config' 332.7 332.7 npm error A complete log of this run can be found in: /root/.npm/_logs/2024-11-08T07_57_55_852Z-debug-0.log
1 warning found (use docker --debug to expand):
ERROR: failed to solve: process "/bin/sh -c npm install -g pnpm && pnpm install --production&& pnpm store prune && npm uninstall pnpm -g" did not complete successfully: exit code: 1
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/xd4rgvjjhhn20oj5nahrzc3k1
这是完整的,看上去是安装的时候获取不到资源可能?看到networkle 。
"registry-mirrors": [ "https://docker.1panel.live", "https://hub.rat.dev" ] 我的镜像地址
需要自助解决下魔法上网的问题,国内 npm 和 docker 及linux 一些源都需要有代理或者镜像地址,日志好像是 npm 安装pnpm失败了,可以多找找网上的方案
需要自助解决下魔法上网的问题,国内 npm 和 docker 及linux 一些源都需要有代理或者镜像地址,日志好像是 npm 安装pnpm失败了,可以多找找网上的方案
我试试,之前我也以为是命令不是最新的才没成功,想过开魔法。主要是我资源都下载好了,又想可能不是资源问题,所以就请教下。嗯,我先试试把。
⚠️不按照以下格式创建的issue将不会获得回复⚠️
提bug前先检查以下是否已经执行
bug描述
有时候一句话问题并不知道在描述什么
所以请按以下格式描述问题:
提供有用的信息
SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "LOGIN_API_TOKEN") (line 21) Dockerfile:14
12 |
13 | # 安装应用程序依赖项 14 | >>> RUN npm install -g pnpm && pnpm install --production&& pnpm store prune && npm uninstall pnpm -g 15 | # 复制应用程序代码到工作目录 16 | COPY . .
ERROR: failed to solve: process "/bin/sh -c npm install -g pnpm && pnpm install --production&& pnpm store prune && npm uninstall pnpm -g" did not complete successfully: exit code: 1
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/xd4rgvjjhhn20oj5nahrzc3k1