-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev.ubuntu
More file actions
78 lines (63 loc) · 1.47 KB
/
Dockerfile.dev.ubuntu
File metadata and controls
78 lines (63 loc) · 1.47 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# ReconFlow Development Dockerfile (Ubuntu-based)
# Includes all build tools and source code
FROM golang:1.24 AS builder
# Install build dependencies
RUN apt-get update && apt-get install -y \
git \
gcc \
make \
pkg-config \
libpcap-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build with debug symbols
RUN CGO_ENABLED=1 GOOS=linux go build -o reconflow \
-gcflags="all=-N -l" \
-ldflags="-w" \
./cmd/reconflow
# ===========================================
# Development Runtime
# ===========================================
FROM ubuntu:22.04 AS runtime
# Install runtime dependencies and development tools
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
bash \
git \
golang \
make \
nmap \
masscan \
dnsutils \
nodejs \
npm \
python3 \
libpcap0.8 \
sqlite3 \
lsof \
strace \
tcpdump \
vim \
nano \
htop \
&& rm -rf /var/lib/apt/lists/*
# Create directories
RUN mkdir -p /app/output /wordlists /root/go/src/reconflow
# Copy binary
COPY --from=builder /build/reconflow /usr/local/bin/reconflow
# Set environment
ENV PATH="/usr/local/bin:/root/go/bin:${PATH}"
ENV GOPATH="/root/go"
ENV HOME="/root"
ENV CGO_ENABLED=1
# Mount source code for development
VOLUME ["/app", "/root/go/src/reconflow"]
WORKDIR /app
ENTRYPOINT ["/bin/bash"]