Added support for multi-arch image build

This commit is contained in:
David Shay
2022-01-12 10:31:26 -05:00
parent 178ba93b5a
commit f3295b99ef
3 changed files with 46 additions and 9 deletions
+9
View File
@@ -0,0 +1,9 @@
FROM golang:bullseye AS build
WORKDIR /src
COPY . .
RUN go list -f '{{join .Deps "\n"}}' ./cmd/kured | grep -v /vendor/ | xargs go list -f '{{if not .Standard}}{{ $dep := . }}{{range .GoFiles}}{{$dep.Dir}}/{{.}} {{end}}{{end}}'
RUN CGO_ENABLED=0 GOOS=linux go build -o cmd/kured/kured cmd/kured/*.go
FROM alpine:latest as bin
RUN apk update --no-cache && apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata
COPY --from=build /src/cmd/kured/kured /usr/bin/kured
ENTRYPOINT ["/usr/bin/kured"]