forked from ahlashkari/CICFlowMeter
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (23 loc) · 974 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (23 loc) · 974 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
32
33
34
FROM alpine:latest as builder
# Install packages
RUN apk add --update --no-cache unzip openjdk8 libpcap-dev
# Copy files
COPY . /CICFlowMeter/
# Set working directory
WORKDIR /CICFlowMeter
# Build from sources
RUN ./gradlew distZip
# Unpack the binary
RUN UNZIP_DISABLE_ZIPBOMB_DETECTION=TRUE unzip -o build/distributions/CICFlowMeter-*.zip -d build/distributions
FROM alpine:latest
# Install packages
RUN apk add --update --no-cache openjdk8 libpcap-dev
# Set working directory
WORKDIR /CICFlowMeter
# Copy files from build
COPY --from=builder /CICFlowMeter/build/distributions/CICFlowMeter-* .
# Set working directory - important since relative path is used in the cli "-Djava.library.path=../lib/native"
WORKDIR /CICFlowMeter/bin
# RUN CICFlowMeter cli to extract features from pcap file or folder of pcap files
# USAGE: docker run -v /path/to/pcap:/tmp/pcap cicflowmeter /tmp/pcap/input /tmp/pcap/output
ENTRYPOINT ["./cfm"]