gpt4 book ai didi

Docker Image not running. Error Command failed with exit code 127(Docker映像未运行。错误命令失败,退出代码为127)

转载 作者:bug小助手 更新时间:2023-10-27 19:53:37 28 4
gpt4 key购买 nike



The GitHub repo is: https://github.com/FlowiseAI/Flowise

GitHub存储库是:https://github.com/FlowiseAI/Flowise


The project already has a Dockerfile. I've ran the following to create a Docker image for the project:

该项目已有一个Dockerfile。我运行了以下命令来为该项目创建Docker映像:


docker build --no-cache -t zulele/flowise:1.1.0 .

The image was created successfully. But when I ran a container from the built image:

已成功创建该映像。但是,当我从构建的映像运行容器时:


docker run -d --name flowise -p 3000:3000 zulele/flowise:1.1.0

I got the following error:

我收到以下错误:


enter image description here


I thought maybe the error is regarding Docker not being able to locate the run file. So I copied the packages folder separately in the image by adding the following command in the Dockerfile:

我认为错误可能是关于Docker找不到运行文件。因此,通过在Dockerfile中添加以下命令,我在映像中单独复制了Packages文件夹:


COPY packages ./packages

But I still got the same error. Then, I located the run file in the Docker container files and added the path to that file in the package.json file. But then it gave me the following error:
enter image description here

但我还是犯了同样的错误。然后,我在Docker容器文件中找到Run文件,并将该文件的路径添加到Package.json文件中。但随后它给了我以下错误:


更多回答
优秀答案推荐

You have working directory set to /usr/src/packages and you're copying files to packages/server. However, package.json scripts looks for the file in the package/server/bin directory. So packages is put twice in the path. The solution is to change working directory to /usr/src, or remove packages/ from all COPY instructions.

您将工作目录设置为/usr/src/packages,并将文件复制到packages/server。但是,package.json脚本会在package/server/bin目录中查找该文件。所以packages被放在路径中两次。解决方案是将工作目录改为/usr/src,或者从所有COPY指令中删除packages/。



I could not reproduce your issue with today's commit 032cf6bbda57ab2aade5053d67a51c9f86721805 . I used your exact commands and the container is now running.
What is your version, what does git log -1 print?

我无法使用今天的提交032cf6bbda57ab2aade5053d67a51c9f86721805重现您的问题。我使用了您的确切命令,容器现在正在运行。您的版本是什么,GIT LOG-1打印什么?


But, what are you after? Are you trying to run a community version of flowise in docker or do you want to test a modification?
There are 2 Dockerfiles in the repo. You tried the one in the root folder, have a try with the one in directory docker.

但是,你在找什么呢?你是想在docker中运行一个社区版的Flow,还是想测试一个修改?回购中有2个Docker文件。您尝试了根文件夹中的文件,请尝试目录停靠器中的文件。


Go into directory docker and follow the instructions from README.md.

进入目录停靠器,然后按照Readme.md中的说明进行操作。


Here is my simplified version of docker/Dockerfile that also references a specific version, as opposed to latest:

以下是我的docker/Dockerfile的简化版本,它也引用了一个特定版本,而不是最新版本:


FROM node:18-alpine

USER root

RUN apk add --no-cache python3 py3-pip
RUN npm install -g [email protected]

WORKDIR /data

CMD "flowise"

更多回答

I have changed the working directory to /usr/src I got the same error: 2023-09-10 23:53:16 yarn run v1.22.19 2023-09-10 23:53:16 $ run-script-os 2023-09-10 23:53:17 $ cd packages/server/bin && ./run start 2023-09-10 23:53:17 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 2023-09-10 23:53:17 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ': No such file or directory't execute 'node 2023-09-10 23:53:17 error Command failed with exit code 127. 2023-09-10 23:53:17 error Command failed with exit code 127.

我已将工作目录更改为/usr/src,我收到了相同的错误:2023-09-10 23:53:16 SUN RUN v1.22.19 2023-09-10 23:53:16$Run-SCRIPT-os 2023-09-10 23:53:17$CD Packages/SERVER/bin&&./Run Start 2023-09-10 23:53:17有关此命令的文档,请访问https://yarnpkg.com/en/docs/cli/run。2023-09-10 23:53:17信息有关此命令的文档,请访问https://yarnpkg.com/en/docs/cli/run。‘:没有这样的文件或目录无法执行’节点2023-09-10 23:53:17错误命令失败,退出代码127。2023-09-10 23:53:17错误命令失败,退出代码127。

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com