-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (23 loc) · 736 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (23 loc) · 736 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
# Stage 1: Build node-pty for linux-x64
FROM node:18-bookworm-slim AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 make g++ && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --production 2>&1
# Stage 2: Runtime (Docker CLI + Node.js, no build tools)
FROM node:18-bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
docker.io unzip zip && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY package.json ./
COPY src/ ./src/
COPY bin/ ./bin/
COPY web/ ./web/
RUN chmod +x bin/docker-proxy && npm link
ENV PORT=9000
EXPOSE 9000
CMD ["node", "web/server.js"]