[BUG] Docker build fails - Can we get a ready made Image ?
Trying to build a docker images after git clone give you this :
user@system:~/Flowise$ docker build -t flowise --no-cache .
[+] Building 1.7s (9/15)
=> [internal] load .dockerignore 0.2s
=> => transferring context: 98B 0.0s
=> [internal] load build definition from Dockerfile 0.2s
=> => transferring dockerfile: 697B 0.0s
=> [internal] load metadata for docker.io/library/node:18-alpine 0.8s
=> CANCELED [ 1/11] FROM docker.io/library/node:18-alpine@sha256:5850491d7879608eb7f7f7fe5beecd946b8b811356 0.6s
=> => resolve docker.io/library/node:18-alpine@sha256:5850491d7879608eb7f7f7fe5beecd946b8b811356dab83c02699 0.2s
=> => sha256:44aaf1ccc80eaed6572a0f2ef7d6b5a2982d54481e4255480041ac92221e2f11 1.16kB / 1.16kB 0.0s
=> => sha256:6f44d13dd2586511d630d7708da1eaac09c05693d9e3e06f3f72206927d3201d 6.49kB / 6.49kB 0.0s
=> => sha256:5850491d7879608eb7f7f7fe5beecd946b8b811356dab83c02699d7d77de61a2 1.43kB / 1.43kB 0.0s
=> => sha256:931b0e865bc24d4d3f7032c4a9b98b4790ee7bb8dcd0d2fd02e15e163d806034 0B / 47.48MB 0.4s
=> => sha256:f56be85fc22e46face30e2c3de3f7fe7c15f8fd7c4e5add29d7f64b87abdaa09 0B / 3.37MB 0.4s
=> [internal] load build context 0.3s
=> => transferring context: 35.31kB 0.2s
=> CACHED [ 2/11] RUN apk add --update libc6-compat 0.0s
=> CACHED [ 3/11] WORKDIR /usr/src/packages 0.0s
=> CACHED [ 4/11] COPY package.json ./ 0.0s
=> ERROR [ 5/11] COPY yarn.lock ./ 0.0s
------
> [ 5/11] COPY yarn.lock ./:
------
Dockerfile:14
--------------------
12 | # Copy root package.json and lockfile
13 | COPY package.json ./
14 | >>> COPY yarn.lock ./
15 |
16 | # Copy components package.json
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::walawk3l61z01tnis6w1om4nm: "/yarn.lock": not found
For ready made image you can follow docker compose setup guide https://github.com/FlowiseAI/Flowise/tree/main/docker. For this error, seems like you haven't installed the project yet
@HenryHengZJ Related to this, I'm trying to automate a docker and/or npm build. Seems the docker image build is just installing the flowise npm package is this correct? Do you have either a full docker image build from source or npm deployment scripts please?
This Dockerfile is building image through npm This Dockerfile is building image from source code
This :
https://github.com/FlowiseAI/Flowise/tree/main/docker
Just doesnt work. The container starts and instantly exists with the following logs :
Flowiseai Server
VERSION
flowise/1.2.10 linux-x64 node-v18.16.0
USAGE
$ flowise [COMMAND]
COMMANDS
start
For the original issue of @zzecool, it was because yarn.lock was not commit into the git. if yarn has not been executed locally,yarn.lock will not exists, and an error occurs on build docker.
https://github.com/FlowiseAI/Flowise/blob/ab00214ec2718e6d2fb5689d86d8342a95c0d07e/Dockerfile#L13-L14
If changed to conditional copy, it will be ok.
COPY package.json yarn.loc[k] ./
I went to build the image with the hope that it will work because the official container doesn't.
closing as #258 should fixed this