diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1b2cdcc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM --platform=$BUILDPLATFORM golang:1.22.5 AS builder + +ENV GO111MODULE=on +ARG TARGETARCH + +WORKDIR /app + +COPY . . + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags "-s -w" -o rollouts-plugin-trafficrouter-gatewayapi . + +FROM alpine:3.19.0 + +ARG TARGETARCH + +USER 999 + +COPY --from=builder /app/rollouts-plugin-trafficrouter-gatewayapi /bin/