forked from atiilla/netzap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 731 Bytes
/
Dockerfile
File metadata and controls
41 lines (31 loc) · 731 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
36
37
38
39
40
41
FROM node:18-slim
# Install dependencies for zmap
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
pkg-config \
libgmp3-dev \
gengetopt \
libpcap-dev \
flex \
byacc \
libjson-c-dev \
zmap \
sudo \
libcap2-bin \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy package files
COPY package.json package-lock.json* ./
# Install dependencies
RUN npm ci --legacy-peer-deps
# Copy the rest of the application
COPY . .
# Set environment variable to indicate Docker environment
ENV DOCKER_ENV=true
# Build the Next.js app
RUN npm run build
EXPOSE 3000
# Custom entrypoint to run zmap.sh before starting Next.js
CMD ["npm", "start"]