<commit_before># compile vpp-agent needs vpp libs
FROM contiv/vpp-base-builder:b59bd659 as builder

ENV GOLANG_VERSION 1.9.3
ENV GOPATH /root/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin

RUN apt-get update \
    && apt-get install -y curl git make \
    && rm -rf /var/lib/apt/lists/* \
    && curl -L "https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz" | tar -C /usr/local -xzf - \
    && go get -u github.com/golang/lint/golint

ADD . $GOPATH/src/github.com/contiv/vpp

# lint and only build vpp-agent
RUN cd $GOPATH/src/github.com/contiv/vpp \
    && make lint agent

FROM contiv/vpp-base:b59bd659

RUN apt-get update \
    && apt-get install -y ethtool supervisor

# copy binaries
COPY --from=builder /root/go/src/github.com/contiv/vpp/cmd/contiv-agent/contiv-agent /usr/bin/contiv-agent

# add contiv-vswitch.conf<commit_msg>Use COPY instead of ADD for putting codes into container<commit_after># compile vpp-agent needs vpp libs
FROM contiv/vpp-base-builder:b59bd659 as builder

ENV GOLANG_VERSION 1.9.3
ENV GOPATH /root/go
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin

RUN apt-get update \
    && apt-get install -y curl git make \
    && rm -rf /var/lib/apt/lists/* \
    && curl -L "https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz" | tar -C /usr/local -xzf - \
    && go get -u github.com/golang/lint/golint

COPY . $GOPATH/src/github.com/contiv/vpp

# lint and only build vpp-agent
RUN cd $GOPATH/src/github.com/contiv/vpp \
    && make lint agent

FROM contiv/vpp-base:b59bd659

RUN apt-get update \
    && apt-get install -y ethtool supervisor

# copy binaries
COPY --from=builder /root/go/src/github.com/contiv/vpp/cmd/contiv-agent/contiv-agent /usr/bin/contiv-agent

# add contiv-vswitch.conf
{'fraction_non_alphanumeric': 0.1375722543352601, 'fraction_numerical': 0.017341040462427744, 'mean_word_length': 3.082547169811321, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4013348', 'n_tokens_mistral': 715, 'n_tokens_neox': 670, 'n_words': 154}