[GH-ISSUE #1761] [BUG]: Unable to build docker image after a fresh fork. #1151

Closed
opened 2026-02-22 18:23:22 -05:00 by yindo · 4 comments
Owner

Originally created by @SeaDude on GitHub (Jun 25, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1761

How are you running AnythingLLM?

Docker (local)

What happened?

Unable to build docker image after a fresh fork.

Are there known steps to reproduce?

  1. Forked the Anything LLM repo
  2. git clone https://github.com/<me>/anything-llm.git
  3. cd .\anything-llm\docker\
  4. docker build -t <me>/anythingllm:latest .

Error:

[+] Building 2.4s (32/37)                                                                                                     docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                          0.0s
 => => transferring dockerfile: 7.21kB                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/ubuntu:jammy-20230916                                                                      2.2s
 => [internal] load .dockerignore                                                                                                             0.0s
 => => transferring context: 2B                                                                                                               0.0s
 => [internal] load build context                                                                                                             0.0s
 => => transferring context: 2B                                                                                                               0.0s
 => CANCELED [base 1/1] FROM docker.io/library/ubuntu:jammy-20230916@sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea  0.0s
 => => resolve docker.io/library/ubuntu:jammy-20230916@sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea                0.0s
 => => sha256:b4b521bfcec90b11d2869e00fe1f2380c21cbfcd799ee35df8bd7ac09e6f63ea 424B / 424B                                                    0.0s
 => => sha256:3565a89d9e81a4cb4cb2b0d947c7c11227a3f358dc216d19fc54bfd77cd5b542 2.30kB / 2.30kB                                                0.0s
 => => sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea 1.13kB / 1.13kB                                                0.0s
 => CACHED [build-amd64 1/7] RUN echo "Preparing build of AnythingLLM image for non-ARM architecture"                                         0.0s
 => CACHED [build-amd64 2/7] RUN DEBIAN_FRONTEND=noninteractive apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install -yq --n  0.0s
 => CACHED [build-amd64 3/7] RUN groupadd -g "1000" anythingllm &&     useradd -l -u "1000" -m -d /app -s /bin/bash -g anythingllm anythingl  0.0s
 => ERROR [build-amd64 4/7] COPY ./docker/docker-entrypoint.sh /usr/local/bin/                                                                0.0s
 => ERROR [build-amd64 5/7] COPY ./docker/docker-healthcheck.sh /usr/local/bin/                                                               0.0s
 => ERROR [build-amd64 6/7] COPY --chown=anythingllm:anythingllm ./docker/.env.example /app/server/.env                                       0.0s
 => CACHED [build-amd64 7/7] RUN chmod +x /usr/local/bin/docker-entrypoint.sh &&     chmod +x /usr/local/bin/docker-healthcheck.sh            0.0s
 => CACHED [build 1/2] RUN echo "Running common build flow of AnythingLLM image for all architectures"                                        0.0s
 => CACHED [build 2/2] WORKDIR /app                                                                                                           0.0s
 => ERROR [server-deps 1/7] COPY ./server/package.json ./server/yarn.lock ./server/                                                           0.0s
 => CACHED [server-deps 2/7] WORKDIR /app/server                                                                                              0.0s
 => CACHED [server-deps 3/7] RUN yarn install --production --network-timeout 100000 && yarn cache clean                                       0.0s
 => CACHED [server-deps 4/7] WORKDIR /app                                                                                                     0.0s
 => CACHED [server-deps 5/7] WORKDIR /app/server                                                                                              0.0s
 => CACHED [server-deps 6/7] RUN npx --no node-llama-cpp download                                                                             0.0s
 => CACHED [server-deps 7/7] WORKDIR /app                                                                                                     0.0s
 => ERROR [production-stage 1/8] COPY --chown=anythingllm:anythingllm ./server/ ./server/                                                     0.0s
 => ERROR [frontend-deps 1/4] COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/                                                   0.0s
 => CACHED [frontend-deps 2/4] WORKDIR /app/frontend                                                                                          0.0s
 => CACHED [frontend-deps 3/4] RUN yarn install --network-timeout 100000 && yarn cache clean                                                  0.0s
 => CACHED [frontend-deps 4/4] WORKDIR /app                                                                                                   0.0s
 => ERROR [build-stage 1/4] COPY ./frontend/ ./frontend/                                                                                      0.0s
 => CACHED [build-stage 2/4] WORKDIR /app/frontend                                                                                            0.0s
 => CACHED [build-stage 3/4] RUN yarn build && yarn cache clean                                                                               0.0s
 => CACHED [build-stage 4/4] WORKDIR /app                                                                                                     0.0s
 => CACHED [production-stage 2/8] COPY --chown=anythingllm:anythingllm --from=build-stage /app/frontend/dist ./server/public                  0.0s
 => ERROR [production-stage 3/8] COPY --chown=anythingllm:anythingllm ./collector/ ./collector/                                               0.0s
------
 > [build-amd64 4/7] COPY ./docker/docker-entrypoint.sh /usr/local/bin/:
------
------
 > [build-amd64 5/7] COPY ./docker/docker-healthcheck.sh /usr/local/bin/:
------
------
 > [build-amd64 6/7] COPY --chown=anythingllm:anythingllm ./docker/.env.example /app/server/.env:
------
------
 > [server-deps 1/7] COPY ./server/package.json ./server/yarn.lock ./server/:
------
------
 > [production-stage 1/8] COPY --chown=anythingllm:anythingllm ./server/ ./server/:
------
------
 > [frontend-deps 1/4] COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/:
------
------
 > [build-stage 1/4] COPY ./frontend/ ./frontend/:
------
------
 > [production-stage 3/8] COPY --chown=anythingllm:anythingllm ./collector/ ./collector/:
------
Dockerfile:152
--------------------
 150 |
 151 |     # Copy the collector
 152 | >>> COPY --chown=anythingllm:anythingllm ./collector/ ./collector/
 153 |
 154 |     # Install collector dependencies
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::5775m9yhyt0morvib1mk9f8ym: "/collector": not found
Originally created by @SeaDude on GitHub (Jun 25, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1761 ### How are you running AnythingLLM? Docker (local) ### What happened? Unable to build docker image after a fresh fork. ### Are there known steps to reproduce? 1. Forked the Anything LLM repo 2. `git clone https://github.com/<me>/anything-llm.git` 3. `cd .\anything-llm\docker\` 4. `docker build -t <me>/anythingllm:latest .` **Error**: ``` [+] Building 2.4s (32/37) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 7.21kB 0.0s => [internal] load metadata for docker.io/library/ubuntu:jammy-20230916 2.2s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load build context 0.0s => => transferring context: 2B 0.0s => CANCELED [base 1/1] FROM docker.io/library/ubuntu:jammy-20230916@sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea 0.0s => => resolve docker.io/library/ubuntu:jammy-20230916@sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea 0.0s => => sha256:b4b521bfcec90b11d2869e00fe1f2380c21cbfcd799ee35df8bd7ac09e6f63ea 424B / 424B 0.0s => => sha256:3565a89d9e81a4cb4cb2b0d947c7c11227a3f358dc216d19fc54bfd77cd5b542 2.30kB / 2.30kB 0.0s => => sha256:9b8dec3bf938bc80fbe758d856e96fdfab5f56c39d44b0cff351e847bb1b01ea 1.13kB / 1.13kB 0.0s => CACHED [build-amd64 1/7] RUN echo "Preparing build of AnythingLLM image for non-ARM architecture" 0.0s => CACHED [build-amd64 2/7] RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq --n 0.0s => CACHED [build-amd64 3/7] RUN groupadd -g "1000" anythingllm && useradd -l -u "1000" -m -d /app -s /bin/bash -g anythingllm anythingl 0.0s => ERROR [build-amd64 4/7] COPY ./docker/docker-entrypoint.sh /usr/local/bin/ 0.0s => ERROR [build-amd64 5/7] COPY ./docker/docker-healthcheck.sh /usr/local/bin/ 0.0s => ERROR [build-amd64 6/7] COPY --chown=anythingllm:anythingllm ./docker/.env.example /app/server/.env 0.0s => CACHED [build-amd64 7/7] RUN chmod +x /usr/local/bin/docker-entrypoint.sh && chmod +x /usr/local/bin/docker-healthcheck.sh 0.0s => CACHED [build 1/2] RUN echo "Running common build flow of AnythingLLM image for all architectures" 0.0s => CACHED [build 2/2] WORKDIR /app 0.0s => ERROR [server-deps 1/7] COPY ./server/package.json ./server/yarn.lock ./server/ 0.0s => CACHED [server-deps 2/7] WORKDIR /app/server 0.0s => CACHED [server-deps 3/7] RUN yarn install --production --network-timeout 100000 && yarn cache clean 0.0s => CACHED [server-deps 4/7] WORKDIR /app 0.0s => CACHED [server-deps 5/7] WORKDIR /app/server 0.0s => CACHED [server-deps 6/7] RUN npx --no node-llama-cpp download 0.0s => CACHED [server-deps 7/7] WORKDIR /app 0.0s => ERROR [production-stage 1/8] COPY --chown=anythingllm:anythingllm ./server/ ./server/ 0.0s => ERROR [frontend-deps 1/4] COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/ 0.0s => CACHED [frontend-deps 2/4] WORKDIR /app/frontend 0.0s => CACHED [frontend-deps 3/4] RUN yarn install --network-timeout 100000 && yarn cache clean 0.0s => CACHED [frontend-deps 4/4] WORKDIR /app 0.0s => ERROR [build-stage 1/4] COPY ./frontend/ ./frontend/ 0.0s => CACHED [build-stage 2/4] WORKDIR /app/frontend 0.0s => CACHED [build-stage 3/4] RUN yarn build && yarn cache clean 0.0s => CACHED [build-stage 4/4] WORKDIR /app 0.0s => CACHED [production-stage 2/8] COPY --chown=anythingllm:anythingllm --from=build-stage /app/frontend/dist ./server/public 0.0s => ERROR [production-stage 3/8] COPY --chown=anythingllm:anythingllm ./collector/ ./collector/ 0.0s ------ > [build-amd64 4/7] COPY ./docker/docker-entrypoint.sh /usr/local/bin/: ------ ------ > [build-amd64 5/7] COPY ./docker/docker-healthcheck.sh /usr/local/bin/: ------ ------ > [build-amd64 6/7] COPY --chown=anythingllm:anythingllm ./docker/.env.example /app/server/.env: ------ ------ > [server-deps 1/7] COPY ./server/package.json ./server/yarn.lock ./server/: ------ ------ > [production-stage 1/8] COPY --chown=anythingllm:anythingllm ./server/ ./server/: ------ ------ > [frontend-deps 1/4] COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/: ------ ------ > [build-stage 1/4] COPY ./frontend/ ./frontend/: ------ ------ > [production-stage 3/8] COPY --chown=anythingllm:anythingllm ./collector/ ./collector/: ------ Dockerfile:152 -------------------- 150 | 151 | # Copy the collector 152 | >>> COPY --chown=anythingllm:anythingllm ./collector/ ./collector/ 153 | 154 | # Install collector dependencies -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::5775m9yhyt0morvib1mk9f8ym: "/collector": not found ```
yindo added the possible bug label 2026-02-22 18:23:22 -05:00
yindo closed this issue 2026-02-22 18:23:22 -05:00
Author
Owner

@SeaDude commented on GitHub (Jun 25, 2024):

Very strange...I commented-out line 152 in the Dockerfile. Now each time I run the docker build command, the script fails on a different line!

Dockerfile:139
--------------------
 137 |     # Build the frontend
 138 |     FROM frontend-deps AS build-stage
 139 | >>> COPY ./frontend/ ./frontend/
 140 |     WORKDIR /app/frontend
 141 |     RUN yarn build && yarn cache clean
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::k0yqc0m5571h2p13w2lrqipn9: "/frontend": not found

---

Dockerfile:146
--------------------
 144 |     # Setup the server
 145 |     FROM server-deps AS production-stage
 146 | >>> COPY --chown=anythingllm:anythingllm ./server/ ./server/
 147 |
 148 |     # Copy built static frontend files to the server public directory
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::nokiuthurjf2t9p35yw4xavsj: "/server": not found

---

Dockerfile:118
--------------------
 116 |     FROM build AS frontend-deps
 117 |
 118 | >>> COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/
 119 |     WORKDIR /app/frontend
 120 |     RUN yarn install --network-timeout 100000 && yarn cache clean
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::cw213rcbiecvhauejifibn9iy: "/frontend/package.json": not found
@SeaDude commented on GitHub (Jun 25, 2024): Very strange...I commented-out line 152 in the Dockerfile. Now each time I run the `docker build` command, the script fails on a different line! ``` Dockerfile:139 -------------------- 137 | # Build the frontend 138 | FROM frontend-deps AS build-stage 139 | >>> COPY ./frontend/ ./frontend/ 140 | WORKDIR /app/frontend 141 | RUN yarn build && yarn cache clean -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::k0yqc0m5571h2p13w2lrqipn9: "/frontend": not found --- Dockerfile:146 -------------------- 144 | # Setup the server 145 | FROM server-deps AS production-stage 146 | >>> COPY --chown=anythingllm:anythingllm ./server/ ./server/ 147 | 148 | # Copy built static frontend files to the server public directory -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::nokiuthurjf2t9p35yw4xavsj: "/server": not found --- Dockerfile:118 -------------------- 116 | FROM build AS frontend-deps 117 | 118 | >>> COPY ./frontend/package.json ./frontend/yarn.lock ./frontend/ 119 | WORKDIR /app/frontend 120 | RUN yarn install --network-timeout 100000 && yarn cache clean -------------------- ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 7ddefbf1-0010-4e74-b0d0-2f26b90a6374::cw213rcbiecvhauejifibn9iy: "/frontend/package.json": not found ```
Author
Owner

@timothycarambat commented on GitHub (Jun 25, 2024):

This could be because the context is wrong?
https://github.com/Mintplex-Labs/anything-llm/blob/fa4ab0f65f290f79ee968210cb88ae145c2845d1/docker/docker-compose.yml#L14

docker build -t <me>/anythingllm:latest . I think would have you in the /docker folder context and not in ../. where you need to be.

docker build -t <me>/anythingllm:latest -f ./Dockerfile ../. should resolve this

@timothycarambat commented on GitHub (Jun 25, 2024): This could be because the context is wrong? https://github.com/Mintplex-Labs/anything-llm/blob/fa4ab0f65f290f79ee968210cb88ae145c2845d1/docker/docker-compose.yml#L14 `docker build -t <me>/anythingllm:latest .` I think would have you in the `/docker` folder context and not in `../.` where you need to be. `docker build -t <me>/anythingllm:latest -f ./Dockerfile ../.` should resolve this
Author
Owner

@SeaDude commented on GitHub (Jun 26, 2024):

Hm... actually, running docker build -t <me>/anythingllm:latest -f ./Dockerfile ../. built the Docker Image, but then running docker run -d -p 3001:3001 --name anythingllm-container <me>/anythingllm:latest results in the following error as shown in Docker Desktop:

2024-06-26 11:21:33 node:internal/modules/cjs/loader:1143
2024-06-26 11:21:33   throw err;
2024-06-26 11:21:33   ^
2024-06-26 11:21:33 
2024-06-26 11:21:33 Error: Cannot find module '/app/collector/index.js'
2024-06-26 11:21:33     at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
2024-06-26 11:21:33     at Module._load (node:internal/modules/cjs/loader:981:27)
2024-06-26 11:21:33     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
2024-06-26 11:21:33     at node:internal/main/run_main_module:28:49 {
2024-06-26 11:21:33   code: 'MODULE_NOT_FOUND',
2024-06-26 11:21:33   requireStack: []
2024-06-26 11:21:33 }
2024-06-26 11:21:33 
2024-06-26 11:21:33 Node.js v18.20.3
@SeaDude commented on GitHub (Jun 26, 2024): Hm... actually, running `docker build -t <me>/anythingllm:latest -f ./Dockerfile ../.` built the Docker Image, but then running `docker run -d -p 3001:3001 --name anythingllm-container <me>/anythingllm:latest` results in the following error as shown in Docker Desktop: ``` 2024-06-26 11:21:33 node:internal/modules/cjs/loader:1143 2024-06-26 11:21:33 throw err; 2024-06-26 11:21:33 ^ 2024-06-26 11:21:33 2024-06-26 11:21:33 Error: Cannot find module '/app/collector/index.js' 2024-06-26 11:21:33 at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15) 2024-06-26 11:21:33 at Module._load (node:internal/modules/cjs/loader:981:27) 2024-06-26 11:21:33 at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) 2024-06-26 11:21:33 at node:internal/main/run_main_module:28:49 { 2024-06-26 11:21:33 code: 'MODULE_NOT_FOUND', 2024-06-26 11:21:33 requireStack: [] 2024-06-26 11:21:33 } 2024-06-26 11:21:33 2024-06-26 11:21:33 Node.js v18.20.3 ```
Author
Owner

@timothycarambat commented on GitHub (Jun 26, 2024):

Are you running docker run -d -p 3001:3001 --name anythingllm-container <me>/anythingllm:latest in the docker folder or at the root? Should be at the root I would think

@timothycarambat commented on GitHub (Jun 26, 2024): Are you running `docker run -d -p 3001:3001 --name anythingllm-container <me>/anythingllm:latest` in the `docker` folder or at the root? Should be at the root I would think
yindo changed title from [BUG]: Unable to build docker image after a fresh fork. to [GH-ISSUE #1761] [BUG]: Unable to build docker image after a fresh fork. 2026-06-05 14:39:13 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1151