Docker Image not running. Error Command failed with exit code 127

437 Views Asked by At

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

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

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:

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

2

There are 2 best solutions below

1
msrumon On

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.

0
Ludwig Prager On

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?

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.

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

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

FROM node:18-alpine

USER root

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

WORKDIR /data

CMD "flowise"