-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
35 lines (24 loc) · 913 Bytes
/
Dockerfile
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
FROM golang:1.12.1-stretch AS builder
RUN apt-get update && \
apt-get -y -q install wget lsb-release gnupg && \
wget -q http://apt-stable.ntop.org/16.04/all/apt-ntop-stable.deb && \
dpkg -i apt-ntop-stable.deb && \
apt-get clean all
RUN apt-get update && \
apt-get -y install pfring libpcap-dev && \
go get -u golang.org/x/net/bpf && \
go get -u golang.org/x/sys/unix && \
go get -u github.com/google/gopacket
COPY src/packetcapture src/packetcapture
RUN go build packetcapture
FROM ubuntu:16.04
COPY --from=builder /go/apt-ntop-stable.deb /apt-ntop-stable.deb
RUN apt-get update && \
apt-get -y -q install lsb-release gnupg && \
dpkg -i /apt-ntop-stable.deb && \
apt-get clean all
RUN apt-get update && \
apt-get -y install pfring libpcap-dev && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /go/packetcapture /packetcapture
#CMD /packetcapture