Perplexica icon indicating copy to clipboard operation
Perplexica copied to clipboard

[HELP][docker] Build failed with default

Open debjit opened this issue 1 year ago • 5 comments

Using groq for testing, but the docker build failed, do you have a already build docker present? Looks like next.js sharp is failing to install Here is the error:

 => [perplexica-backend internal] load build definition from backend.dockerfile                                                                0.0s
 => => transferring dockerfile: 440B                                                                                                           0.0s
 => [perplexica-backend internal] load metadata for docker.io/library/node:buster-slim                                                         1.9s
 => [perplexica-backend internal] load .dockerignore                                                                                           0.0s
 => => transferring context: 55B                                                                                                               0.0s
 => [perplexica-backend internal] load build context                                                                                           0.0s
 => => transferring context: 2.03kB                                                                                                            0.0s
 => [perplexica-backend  1/10] FROM docker.io/library/node:buster-slim@sha256:6b9c7110d38cfe71967ba3154c8e32bca078783402b3b801a81dcf9bd22343f  0.0s
 => CACHED [perplexica-backend  2/10] WORKDIR /home/perplexica                                                                                 0.0s
 => CACHED [perplexica-backend  3/10] COPY src /home/perplexica/src                                                                            0.0s
 => CACHED [perplexica-backend  4/10] COPY tsconfig.json /home/perplexica/                                                                     0.0s
 => [perplexica-backend  5/10] COPY config.toml /home/perplexica/                                                                              0.0s
 => [perplexica-backend  6/10] COPY package.json /home/perplexica/                                                                             0.0s
 => [perplexica-backend  7/10] COPY yarn.lock /home/perplexica/                                                                                0.0s
 => [perplexica-backend  8/10] RUN sed -i "s|SEARXNG = ".*"|SEARXNG = "http://searxng:8080"|g" /home/perplexica/config.toml                    0.2s
 => ERROR [perplexica-backend  9/10] RUN yarn install                                                                                         39.7s
------
 > [perplexica-backend  9/10] RUN yarn install:
0.398 yarn install v1.22.19
0.438 [1/4] Resolving packages...
0.533 [2/4] Fetching packages...
31.87 [3/4] Linking dependencies...
31.88 warning " > [email protected]" has unmet peer dependency "@types/node@*".
34.18 [4/4] Building fresh packages...
39.46 error /home/perplexica/node_modules/sharp: Command failed.
39.46 Exit code: 1
39.46 Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
39.46 Arguments:
39.46 Directory: /home/perplexica/node_modules/sharp
39.46 Output:
39.46 sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.5/libvips-8.14.5-linux-x64.tar.br
39.46 sharp: Installation error: Request timed out
39.46 sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
39.46 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

debjit avatar May 22 '24 03:05 debjit

Seems like a network issue? Can you try following the suggestions suggested by the maintainers of sharp in their Github.

ItzCrazyKns avatar May 22 '24 03:05 ItzCrazyKns

I'm running into the same problem. Over on the sharp repo they recommend updating to sharp 0.33:

https://github.com/lovell/sharp/issues/3795

Maybe that helps

leuchtetgruen avatar May 22 '24 08:05 leuchtetgruen

I'm running into the same problem. Over on the sharp repo they recommend updating to sharp 0.33:

lovell/sharp#3795

Maybe that helps

We're not using sharp directly, It is a dependency of some dependency of Perplexica

ItzCrazyKns avatar May 22 '24 08:05 ItzCrazyKns

An official prebuilt docker image will be way more helpful. I will try this later in the evening.

debjit avatar May 22 '24 09:05 debjit

The issue is still present. Same issue.

debjit avatar May 22 '24 19:05 debjit

An official prebuilt docker image will be way more helpful. I will try this later in the evening.

We can't provide it due to the environment variables and the config file that needs to be edited manually. If we started doing so, more issues will come to change stuff, etc.

ItzCrazyKns avatar May 23 '24 16:05 ItzCrazyKns

Just use $PWD to mount the directory where env/config file is located.

debjit avatar May 23 '24 17:05 debjit