Skip to content

Commit

Permalink
#7 adding binaries to dockerfile (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
chifu1234 authored Aug 10, 2021
1 parent ba388c6 commit e728d35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
FROM golang AS gobgp
RUN go get github.com/osrg/gobgp/cmd/gobgp

FROM golang AS gobgp-exporter
RUN cd $GOPATH/src \
&& mkdir -p github.com/greenpau \
&& cd github.com/greenpau \
&& git clone https://github.com/greenpau/gobgp_exporter.git \
&& cd gobgp_exporter \
&& CGO_ENABLED=0 make

FROM gcr.io/distroless/base
COPY goblackhole /usr/bin/goblackhole
COPY ./config.yaml /etc/goblackhole/config.yaml
COPY --from=gobgp-exporter /go/src/github.com/greenpau/gobgp_exporter/bin/gobgp-exporter /usr/bin/gobgp-exporter
COPY --from=gobgp /go/bin/gobgp /usr/bin/gobgp
CMD ["/usr/bin/goblackhole"]

0 comments on commit e728d35

Please # to comment.