2024-02-01 07:23:10 +00:00
|
|
|
FROM golang:1.21.6-alpine3.19 AS builder
|
2020-10-14 23:35:59 +00:00
|
|
|
|
2020-10-16 00:01:05 +00:00
|
|
|
ENV GO111MODULE=on \
|
|
|
|
CGO_ENABLED=0 \
|
|
|
|
GOOS=linux \
|
|
|
|
GOARCH=amd64 \
|
|
|
|
GOBIN=/dist
|
|
|
|
|
2020-10-14 23:35:59 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY go.mod .
|
|
|
|
COPY go.sum .
|
|
|
|
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-07-13 19:37:38 +00:00
|
|
|
RUN go install -ldflags="-w -s" .
|
2020-10-15 01:17:09 +00:00
|
|
|
|
2024-02-01 07:23:10 +00:00
|
|
|
FROM alpine:3.19
|
2020-10-21 00:19:54 +00:00
|
|
|
|
|
|
|
RUN apk --no-cache add fio
|
2020-10-15 01:17:09 +00:00
|
|
|
|
2020-10-16 00:01:05 +00:00
|
|
|
COPY --from=builder /dist/kubestr /
|
2020-10-14 23:35:59 +00:00
|
|
|
|
2020-10-16 00:01:05 +00:00
|
|
|
ENTRYPOINT ["/kubestr"]
|