mirror of
https://github.com/kastenhq/kubestr.git
synced 2024-12-15 17:50:57 +00:00
7446f8cc47
* Update go to 1.17 * Update Kanister to remove vulnerable dependencies * Resolve conflicts * Update actions to use go 1.17 * Update Alpine image * 1st attempt to fix docker build action * 2nd attempt to fix Docker build * Remove patch version
26 lines
349 B
Docker
26 lines
349 B
Docker
FROM golang:1.17.12-alpine3.16 AS builder
|
|
|
|
ENV GO111MODULE=on \
|
|
CGO_ENABLED=0 \
|
|
GOOS=linux \
|
|
GOARCH=amd64 \
|
|
GOBIN=/dist
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN go get -ldflags="-w -s" .
|
|
|
|
FROM alpine:3.16
|
|
|
|
RUN apk --no-cache add fio
|
|
|
|
COPY --from=builder /dist/kubestr /
|
|
|
|
ENTRYPOINT ["/kubestr"]
|