-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (30 loc) · 1.24 KB
/
Dockerfile
File metadata and controls
43 lines (30 loc) · 1.24 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
37
38
39
40
41
42
43
FROM golang:1.22-alpine AS builder
WORKDIR /app
# Copy go.mod and go.sum first to leverage Docker cache
COPY go.mod ./
# Copy source code
COPY main.go ./
COPY main_test.go ./
COPY internal/ ./internal/
# Build the binary with optimizations
RUN CGO_ENABLED=0 GOOS=linux go build -o subenum -ldflags="-w -s" .
# Use a minimal alpine image for the final container
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
# Copy binary from builder stage
COPY --from=builder /app/subenum .
# Copy examples directory with wordlists
COPY examples/ ./examples/
# Create volume mount point for custom wordlists and output
VOLUME ["/data"]
ENTRYPOINT ["./subenum"]
# Default command - shows help
CMD ["-version"]
LABEL org.opencontainers.image.title="subenum"
LABEL org.opencontainers.image.description="A Go-based CLI tool for subdomain enumeration"
LABEL org.opencontainers.image.source="https://github.com/TMHSDigital/subenum"
LABEL org.opencontainers.image.licenses="GPL-3.0"
LABEL org.opencontainers.image.documentation="https://github.com/TMHSDigital/subenum/blob/main/README.md"
LABEL org.opencontainers.image.vendor="Educational Use Only"
LABEL org.opencontainers.image.usage="For educational and legitimate security testing purposes only"