Skip to content

Commit 8714d13

Browse files
committed
Add dockerfile
1 parent f74613b commit 8714d13

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM golang:alpine as builder
2+
RUN apk add --no-cache git
3+
RUN git clone https://github.com/jovial/redfish_exporter /build && cd /build && git checkout feature/log_counts
4+
WORKDIR /build
5+
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o main .
6+
FROM scratch
7+
COPY --from=builder /build/main /app/
8+
WORKDIR /app
9+
CMD ["./main"]
10+

0 commit comments

Comments
 (0)