-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (17 loc) · 677 Bytes
/
Dockerfile
File metadata and controls
31 lines (17 loc) · 677 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
FROM --platform=$BUILDPLATFORM golang:1.22.4-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG TARGETARCH TARGETOS
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -o metasploit-db ./cmd
FROM metasploitframework/metasploit-framework:latest
RUN apk update && apk add --no-cache \
tcpdump \
tshark
WORKDIR /app
COPY --from=builder /app/metasploit-db /app/metasploit-db
COPY --from=builder /app/scripts/ /app/
RUN mkdir -p /app/results
RUN pip3 install -r /app/requirements.txt
ENTRYPOINT ["/bin/sh", "-c", "ruby /usr/src/metasploit-framework/msfrpcd -U msf -P dL0rHLep -p 55552 -S false -f & ./metasploit-db"]