forked from n1n3b1t/ws-scrcpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (30 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
43 lines (30 loc) · 1.09 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
36
37
38
39
40
41
42
43
# syntax=docker/dockerfile:1
# =============================================================================
# Stage 1: Build
# =============================================================================
FROM node:24-bookworm AS builder
WORKDIR /app
# Copy package files first for better layer caching
COPY package*.json ./
# Install all dependencies (including devDependencies for build)
RUN npm install
# Copy source code
COPY . .
# Build the application
RUN npm run dist
# =============================================================================
# Stage 2: Production
# =============================================================================
FROM node:24-bookworm-slim
# Install adb client only (no native module build tools needed — node-pty removed)
RUN apt-get update && apt-get install -y --no-install-recommends \
android-tools-adb \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
WORKDIR /app
# Copy built application from builder stage
COPY --from=builder /app/dist ./
# Install production dependencies
RUN npm install --omit=dev
EXPOSE 8000
CMD ["npm", "start"]