forked from synfinatic/netflow2ng
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 660 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 660 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
FROM golang:alpine AS builder
ARG LDFLAGS=""
RUN apk update --no-cache && \
apk add git build-base gcc pkgconfig zeromq-dev protoc && \
apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing protoc-gen-go
COPY . /build
WORKDIR /build
# manually download modules before invoking make
RUN go mod download && \
OUTPUT_NAME=dist/netflow2ng make
FROM alpine:latest
ARG src_dir
RUN apk update --no-cache && \
apk add libzmq && \
adduser -S -D -H -h / netflow
USER netflow
COPY --from=builder /build/dist/netflow2ng /
# ZMQ
EXPOSE 5556/tcp
# NetFlow v9
EXPOSE 2055/udp
# webserver
EXPOSE 8080/tcp
ENTRYPOINT ["/netflow2ng"]