Mac docker install fails

I messed up to merge different branches so I tried a fresh docker install on a M3 Macbook. Deleted the old container and installed but first it fails creating the container with: …/bolt.diy/.env.local: no such file or directory.

I changed my “old” .env to .env.local and it built the docker and starts up
the home page is coming up and “were ideas begin” is blinking. does not work no input possible keeps static. no button working.
attached is the console output of chrome canary, same with normal chrome

did not try the pnpm install as I want it dockerized

can anybody please help?
thank you


[unocss] unmatched utility "transition-[background-color,border-color,color]" in shortcut "transition-theme"
app-dev-1  | [unocss] unmatched utility "text-bolt-elements-code-text" in shortcut "kdb"
app-dev-1  | [unocss] unmatched utility "bg-bolt-elements-code-background" in shortcut "kdb"
app-dev-1  |  INFO   LLMManager  Registering Provider:  Anthropic
app-dev-1  |  INFO   LLMManager  Registering Provider:  Cohere
app-dev-1  |  INFO   LLMManager  Registering Provider:  Deepseek
app-dev-1  |  INFO   LLMManager  Registering Provider:  Google
app-dev-1  |  INFO   LLMManager  Registering Provider:  Groq
app-dev-1  |  INFO   LLMManager  Registering Provider:  HuggingFace
app-dev-1  |  INFO   LLMManager  Registering Provider:  Hyperbolic
app-dev-1  |  INFO   LLMManager  Registering Provider:  Mistral
app-dev-1  |  INFO   LLMManager  Registering Provider:  Ollama
app-dev-1  |  INFO   LLMManager  Registering Provider:  OpenAI
app-dev-1  |  INFO   LLMManager  Registering Provider:  OpenRouter
app-dev-1  |  INFO   LLMManager  Registering Provider:  OpenAILike
app-dev-1  |  INFO   LLMManager  Registering Provider:  Perplexity
app-dev-1  |  INFO   LLMManager  Registering Provider:  xAI
app-dev-1  |  INFO   LLMManager  Registering Provider:  Together
app-dev-1  |  INFO   LLMManager  Registering Provider:  LMStudio
app-dev-1  |  INFO   LLMManager  Registering Provider:  AmazonBedrock
app-dev-1  |  INFO   LLMManager  Registering Provider:  Github

Can you please provide the docker-compose file you use and also show the commands you used.

I used * stackblitz-labs/bolt.diy with the official install

### Option 2: Using Docker

This option requires some familiarity with Docker but provides a more isolated environment.

#### Additional Prerequisite

* Install Docker: [Download Docker](https://www.docker.com/)

#### Steps:

1. **Build the Docker Image**:

# Using npm script: npm run dockerbuild # OR using direct Docker command: docker build . --target bolt-ai-development

2. **Run the Container**:

docker compose --profile development up

Please show a screenshot of the terminal with the commands you execute.

Also you can try my docker-stack if you want. If you dont want openwebui and ollama, you can just remove or comment it out:

I’ll do later on I am on the road currently.
But I would like to ask you are also using a .env.local file in your .yml
I did download the “official” package I think and can not find a .env.local file in it ?

Yes I also use the .env.local file.

You need to create this file by yourself, as written in the docs. Within the official package the file “.env.example” comes. You need to rename or copy this to .env.local and fill in your keys etc.

Yes I did that, first I used my old .env file renamed it to .env.local and 2. try I used the env.example filled in my keys and renamed it but same effect.
I’ll try soon another fresh install and send the terminal outputs.

1 Like

Attached is the terminal running npm run dockerbuild:

(base) uwesommer@Mac bolt.diy-0.0.6 % npm run dockerbuild

> bolt@0.0.6 dockerbuild
> docker build -t bolt-ai:development -t bolt-ai:latest --target bolt-ai-development .

[+] Building 2.2s (8/10)                                                                                                  docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                      0.0s
 => => transferring dockerfile: 2.73kB                                                                                                    0.0s
 => [internal] load metadata for docker.io/library/node:20.18.0                                                                           1.3s
 => [internal] load .dockerignore                                                                                                         0.0s
 => => transferring context: 474B                                                                                                         0.0s
 => [base 1/5] FROM docker.io/library/node:20.18.0@sha256:a7a3b7ec6de4b11bb2d673b31de9d28c6da09c557ee65453672c8e4f754c23fc                0.0s
 => [internal] load build context                                                                                                         0.0s
 => => transferring context: 29.76kB                                                                                                      0.0s
 => CACHED [base 2/5] WORKDIR /app                                                                                                        0.0s
 => CACHED [base 3/5] COPY package.json pnpm-lock.yaml ./                                                                                 0.0s
 => ERROR [base 4/5] RUN corepack enable pnpm && pnpm install                                                                             0.8s
------                                                                                                                                         
 > [base 4/5] RUN corepack enable pnpm && pnpm install:                                                                                        
0.693 /usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535                                                                         
0.693   if (key == null || signature == null) throw new Error(`Cannot find matching keyid: ${JSON.stringify({ signatures, keys })}`);          
0.693                                               ^                                                                                          
0.693                                                                                                                                          
0.693 Error: Cannot find matching keyid: {"signatures":[{"sig":"MEYCIQDbcyRXEEpUvMj22WsicmOsvx+ctqHZv1vLScf3/247EAIhANfMkRDNAHdtTDNZ34BVH2z2z0Ef8o5VK4osH6ES9RHW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}
0.693     at verifySignature (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21535:47)
0.693     at fetchLatestStableVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21553:5)
0.693     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
0.693     at async fetchLatestStableVersion2 (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21672:14)
0.693     at async Engine.getDefaultVersion (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22292:23)
0.693     at async Engine.executePackageManagerRequest (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:22390:47)
0.693     at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23096:5)
0.693 
0.693 Node.js v20.18.0
------

 18 warnings found (use docker --debug to expand):
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "ANTHROPIC_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "OPEN_ROUTER_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "OPENAI_API_KEY") (line 65)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "GOOGLE_GENERATIVE_AI_API_KEY") (line 68)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "ANTHROPIC_API_KEY") (line 66)
 - UndefinedVar: Usage of undefined variable '$AWS_BEDROCK_CONFIG' (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GROQ_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "HuggingFace_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "OPENAI_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GOOGLE_GENERATIVE_AI_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "TOGETHER_API_KEY") (line 71)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "OPEN_ROUTER_API_KEY") (line 67)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "XAI_API_KEY") (line 70)
 - UndefinedVar: Usage of undefined variable '$HuggingFace_API_KEY' (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "XAI_API_KEY") (line 76)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "TOGETHER_API_KEY") (line 76)
 - JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 92)
 - SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ARG "GROQ_API_KEY") (line 63)
Dockerfile:9
--------------------
   7 |     COPY package.json pnpm-lock.yaml ./
   8 |     
   9 | >>> RUN corepack enable pnpm && pnpm install
  10 |     
  11 |     # Copy the rest of your app's source code
--------------------
ERROR: failed to solve: process "/bin/sh -c corepack enable pnpm && pnpm install" did not complete successfully: exit code: 1

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/v9i7skrjfq6c7yt1ebe5k1sjv


**Now terminal after docker compose:**

(base) uwesommer@Mac bolt.diy-0.0.6 % docker compose --profile development up
WARN[0000] The "GROQ_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "HuggingFace_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OPENAI_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ANTHROPIC_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OPEN_ROUTER_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GOOGLE_GENERATIVE_AI_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OLLAMA_API_BASE_URL" variable is not set. Defaulting to a blank string. 
WARN[0000] The "XAI_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "TOGETHER_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "TOGETHER_API_BASE_URL" variable is not set. Defaulting to a blank string. 
WARN[0000] The "AWS_BEDROCK_CONFIG" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GROQ_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "HuggingFace_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OPENAI_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "ANTHROPIC_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OPEN_ROUTER_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "XAI_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GOOGLE_GENERATIVE_AI_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "OLLAMA_API_BASE_URL" variable is not set. Defaulting to a blank string. 
WARN[0000] The "TOGETHER_API_KEY" variable is not set. Defaulting to a blank string. 
WARN[0000] The "TOGETHER_API_BASE_URL" variable is not set. Defaulting to a blank string. 
WARN[0000] The "AWS_BEDROCK_CONFIG" variable is not set. Defaulting to a blank string. 
[+] Running 2/2
 ✔ Network boltdiy-006_default      Created                                                                                               0.1s 
 ✔ Container boltdiy-006-app-dev-1  Created                                                                                               7.9s 
Attaching to app-dev-1
app-dev-1  | 
app-dev-1  | > bolt@0.0.6 dev /app
app-dev-1  | > node pre-start.cjs  && remix vite:dev "--host" "0.0.0.0"
app-dev-1  | 
app-dev-1  | fatal: not a git repository (or any parent up to mount point /)
app-dev-1  | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app-dev-1  | 
app-dev-1  | ★═══════════════════════════════════════★
app-dev-1  |           B O L T . D I Y
app-dev-1  |          ⚡️  Welcome  ⚡️
app-dev-1  | ★═══════════════════════════════════════★
app-dev-1  | 
app-dev-1  | 📍 Current Version Tag: v"0.0.6"
app-dev-1  | 📍 Current Commit Version: "no-git-info"
app-dev-1  |   Please wait until the URL appears here
app-dev-1  | ★═══════════════════════════════════════★
app-dev-1  | fatal: not a git repository (or any parent up to mount point /)
app-dev-1  | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app-dev-1  | [warn] Data fetching is changing to a single fetch in React Router v7
app-dev-1  | ┃ You can use the `v3_singleFetch` future flag to opt-in early.
app-dev-1  | ┃ -> https://remix.run/docs/en/2.13.1/start/future-flags#v3_singleFetch
app-dev-1  | ┗
app-dev-1  | fatal: not a git repository (or any parent up to mount point /)
app-dev-1  | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
app-dev-1  | plugin 'unocss:global' uses deprecated 'enforce' option. Use 'order' option instead.
app-dev-1  | plugin 'unocss:global' uses deprecated 'transform' option. Use 'handler' option instead.
app-dev-1  | plugin 'unocss:global' uses deprecated 'enforce' option. Use 'order' option instead.
app-dev-1  | plugin 'unocss:global' uses deprecated 'transform' option. Use 'handler' option instead.
app-dev-1  |   ➜  Local:   http://localhost:5173/
app-dev-1  |   ➜  Network: http://172.20.0.2:5173/

Same result as yesterday somewhat running but unusable

I see you running NodeJS Version 20.x. Try using 22.x

Other than that, no idea whats going wrong. Dont use a Mac myself.

I would just recommend using the prebuild image from my dockerstack, so you dont have to build yourself and see if it runs better.

node.js I was on 21.x did update it and used your yml with necessary changes does not work running errors all the time have to interrupt

Hm ok.

What is your docker and docker compose version?

Docker version 27.5.1, build 9f9e405
Docker Compose version v2.32.4-desktop.1

did also try it with node.js 22.x and 23.x all the same

@aliasfox @thecodacus any idea?

I feel you may have used npm instead of pnpm to install some packages… you may want to try npm/pnpm install -g corepack@latest. See: “Cannot Find Matching Keyid” Errors or “Corepack/PNPM Not Found” on GitHub Actions

I did not use npm either as I tried to dockerize

I used

docker build . --target bolt-ai-development
then

docker compose --profile development up

as per official docs

@yvesete you said you tried mine as well. How did you start it? cause this needs no build. its prebuild and should work.

yes I deleted webui and ollama as I have ollama local and webui still in a container and used docker compose I think it has a problem with the environment. I changed it to localhost and also the port to 5137:5137

I would purge your NPM package and re-install. Something in corepack or auth is screwed up and it’s probably the easiest solution. I don’t think it has anything to do with Bolt.diy per se. Is this a clean setup?

Update: Please see ERROR: failed to solve: process "/bin/sh -c corepack enable pnpm && pnpm install" did not complete successfully: exit code: 1 · Issue #1272 · stackblitz-labs/bolt.diy · GitHub which addresses this exact issue. We might need to update the docker files, but I’ll look into this more later.

I did try several clean installs and it builds and composes without error it even runs but is not working. Which npm package do you mean?

Followed ERROR: failed to solve: process "/bin/sh -c corepack enable pnpm && pnpm install" did not complete successfully: exit code: 1 · Issue #1272 · stackblitz-labs/bolt.diy · GitHub
and tried sallespro proposal, updated the docker file and it built differently

[+] Building 37.9s (13/13) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2.79kB 0.0s
=> [internal] load metadata for Docker Hub Container Image Library | App Containerization 1.1s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 474B 0.0s
=> [base 1/7] FROM Docker Hub Container Image Library | App Containerization 0.0s
=> [internal] load build context 0.1s
=> => transferring context: 12.11MB 0.1s
=> CACHED [base 2/7] WORKDIR /app 0.0s
=> [base 3/7] COPY package.json pnpm-lock.yaml ./ 0.0s
=> [base 4/7] RUN npm install -g corepack 0.8s
=> [base 5/7] RUN corepack cache clean 0.1s
=> [base 6/7] RUN corepack enable pnpm && pnpm install 30.1s
=> [base 7/7] COPY . . 0.1s
=> [bolt-ai-development 1/1] RUN mkdir -p ${WORKDIR}/run 0.1s
=> exporting to image 5.3s
=> => exporting layers 5.3s
=> => writing image sha256:69bfcfffb2128286cedfb71d4811d6f8776be1e2771d8d390aa61f528e7fd8fd 0.0s

but result is the same
update klicking bolt.diy reloads the page, nothing else works