forked from EwenDev/NetCraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 656 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (25 loc) · 656 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
30
31
32
33
34
35
FROM node:22-bookworm-slim AS base
FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run prod
FROM debian:bullseye
RUN apt-get update && apt-get install -y \
curl \
gnupg \
python3 \
python3-pip
RUN pip install scapy
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
apt-get install -y nodejs && \
npm install -g npm@latest
WORKDIR /app
COPY --from=builder /app/dist ./app
COPY --from=deps /app/node_modules ./node_modules
EXPOSE 3000
CMD ["node", "./app/bundle.js"]