forked from edgard/iperf3_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2aa7f66
commit 1427913
Showing
2 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.* | ||
Dockerfile | ||
LICENSE* | ||
NOTICE* | ||
README* | ||
iperf3_windows.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
FROM golang:alpine AS build-env | ||
|
||
# Download dependencies | ||
WORKDIR /go/src | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
# Build current sources | ||
COPY . . | ||
RUN go build -o /go/bin/iperf3_exporter | ||
|
||
# Prepare runtime environment | ||
FROM alpine:latest | ||
LABEL maintainer="Edgard Castro <[email protected]>" | ||
|
||
EXPOSE 9579 | ||
RUN apk add --no-cache iperf3 | ||
COPY iperf3_exporter /bin/iperf3_exporter | ||
|
||
ENTRYPOINT ["/bin/iperf3_exporter"] | ||
EXPOSE 9579 | ||
COPY --from=build-env /go/bin/iperf3_exporter /bin/ | ||
ENTRYPOINT ["/bin/iperf3_exporter"] |