-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.artifact
More file actions
26 lines (20 loc) · 983 Bytes
/
Dockerfile.artifact
File metadata and controls
26 lines (20 loc) · 983 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
FROM golang:1.11.5 as vdcThroughput
WORKDIR /opt
COPY . .
RUN CGO_ENABLED=0 go build -a --installsuffix cgo --ldflags="-w -s -X main.Build=$(git rev-parse --short HEAD)" -o vdc-traffic
FROM alpine:latest
COPY --from=vdcThroughput /opt/vdc-traffic /opt/monitoring/vdc-traffic
ENV BUILD_DEPS="gettext alpine-sdk git autoconf automake libtool" \
RUNTIME_DEPS="libintl libpcap-dev ncurses-dev "
# add nassesary command line tools
RUN apk add --update $RUNTIME_DEPS && \
apk add --virtual build_deps $BUILD_DEPS \
&& cd /tmp && git clone https://github.com/dleonard0/pktstat.git \
&& cd pktstat \
&& libtoolize --force && aclocal && autoheader && automake --force-missing --add-missing && autoconf && ./configure \
&& make install && cd ../ rm -rf pktstat \
&& cp /usr/bin/envsubst /usr/local/bin/envsubst \
&& apk del build_deps \
&& rm -rf /var/cache/apk/*
ADD entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]