-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
29 lines (21 loc) · 956 Bytes
/
Dockerfile.dev
File metadata and controls
29 lines (21 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM node:22-slim
# Build tools required by @whiskeysockets/baileys (native modules)
RUN apt-get update && apt-get install -y \
build-essential \
python3 \
git \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g pnpm
WORKDIR /app
# Install dependencies in a separate layer so Docker caches it.
# This layer only rebuilds when package.json or pnpm-lock.yaml changes.
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
# Give the node user ownership of app files (including node_modules named volume).
RUN chown -R node:node /app
# Pre-create Claude config so the SDK subprocess can write to it.
RUN mkdir -p /home/node/.claude && echo '{}' > /home/node/.claude.json && chown -R node:node /home/node
# Switch to non-root user (required for --dangerously-skip-permissions).
USER node
# Source code is NOT copied here — it's mounted at runtime via docker-compose.
# Edits on the host are reflected immediately inside the container.