-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1.14 KB
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 1.14 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
# Build stage
FROM golang:alpine3.21 as builder
RUN apk add make gcc g++ zlib zlib-dev git wget
WORKDIR /app
COPY main.go .
RUN go build main.go
RUN git clone https://github.com/blechschmidt/massdns && \
cd massdns && \
make
RUN wget https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt && \
wget https://raw.githubusercontent.com/trickest/resolvers/main/resolvers-trusted.txt
RUN go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
RUN go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
RUN go install github.com/d3mondev/puredns/v2@latest
# Run stage
FROM alpine:latest
# Create app directory
WORKDIR /app
COPY --from=builder /go/bin/subfinder /usr/local/bin/subfinder
COPY --from=builder /go/bin/httpx /usr/local/bin/httpx
COPY --from=builder /go/bin/puredns /usr/local/bin/puredns
COPY --from=builder /app/massdns/bin/massdns /usr/local/bin/massdns
COPY --from=builder /app/resolvers.txt /app/resolvers.txt
COPY --from=builder /app/resolvers-trusted.txt /app/resolvers-trusted.txt
COPY --from=builder /app/main /app/main
COPY subfinder.yaml .
# Run the binary
CMD ["sh", "-c", "./main"]