Skip to content

Commit 30013f3

Browse files
authored
docs: add section about minimal docker images (#1001)
1 parent 4228bfb commit 30013f3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

packages/docs/content/docs/deployment-guide/self-hosted.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,36 @@ Open [http://localhost:3000](http://localhost:3000) - your app should be running
175175

176176
---
177177

178+
## Troubleshooting
179+
180+
### Using Minimal Docker Images (node:24-slim)
181+
182+
If you're using a minimal Docker image like `node:24-slim` instead of the official `motiadev/motia:latest` image, you may encounter errors when creating a new Motia project or running `motia dev`,
183+
because the `redis-memory-server` package may require build tools (`make`, `gcc`, etc.) to compile Redis from source. These are not included in minimal images.
184+
185+
**Solution:** Install the required dependencies before running Motia:
186+
187+
```bash
188+
docker run --rm node:24-slim bash -c "
189+
apt-get update && apt-get install -y ca-certificates git build-essential &&
190+
npx motia@latest create my-app --template starter-typescript
191+
"
192+
```
193+
194+
**Alternative:** Install Redis system package to avoid compilation:
195+
196+
```bash
197+
docker run --rm node:24-slim bash -c "
198+
apt-get update && apt-get install -y ca-certificates git redis-server &&
199+
export REDISMS_SYSTEM_BINARY=/usr/bin/redis-server &&
200+
npx motia@latest create my-app --template starter-typescript
201+
"
202+
```
203+
204+
**Recommended:** Use the official `motiadev/motia:latest` image which includes all required dependencies, or use the full `node:24` image instead of `node:24-slim`.
205+
206+
---
207+
178208
## Deploy to Cloud
179209

180210
### AWS Lightsail

0 commit comments

Comments
 (0)