clawdbot dockerfile issue

I got the following error while building the Dockerfile
 => ERROR [ 8/14] COPY patches ./patc  0.0s
------
 > [ 8/14] COPY patches ./patches:
------
Dockerfile:21
--------------------
  19 |     COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
  20 |     COPY ui/package.json ./ui/package.json
  21 | >>> COPY patches ./patches
  22 |     COPY scripts ./scripts
  23 |     
--------------------
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref ecaa3f1c-ce82-4807-8746-9d0da01eddc7::q5ck4vqti2cl2xasxxw975e2d: "/patches": not found
Solution
The issue is that the patches directory doesn't exist. The Dockerfile expects it for pnpm patches, but it's not created by default.

Quick fix - create the directory before building:
mkdir -p patches
docker build .


The patches directory is used by pnpm for dependency patching (you'd put .patch files there when you need to modify a dependency's source). An empty directory works fine for the build since no patches are applied yet.
Was this page helpful?