-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
35 lines (26 loc) · 1.13 KB
/
Dockerfile.dev
File metadata and controls
35 lines (26 loc) · 1.13 KB
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
30
31
32
33
34
35
# ============================================
# Protocol Guide - Development Dockerfile
# Runs Express server (3001) + Expo Metro (8081)
# Source code mounted as volumes for hot reload
# ============================================
FROM node:20-alpine
# Install pnpm via corepack (matches packageManager in package.json)
RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
# Install system deps needed by native modules (sharp, canvas, etc.)
RUN apk add --no-cache python3 make g++ git
WORKDIR /app
# Copy dependency manifests first (cached layer)
COPY package.json pnpm-lock.yaml .npmrc ./
# Install all dependencies (dev + prod)
RUN pnpm install --frozen-lockfile
# Copy config files needed at startup (not source — that's volume-mounted)
COPY tsconfig.json tsconfig.server.json babel.config.js metro.config.js ./
COPY tailwind.config.js global.css nativewind-env.d.ts ./
COPY theme.config.js theme.config.d.ts ./
COPY app.config.ts entry.custom.js ./
RUN mkdir -p scripts
COPY scripts/load-env.js scripts/load-env.js
# Expose both ports
EXPOSE 3001 8081
# Default command: run both server + metro concurrently
CMD ["pnpm", "dev"]