diff --git a/interceptor/Dockerfile b/interceptor/Dockerfile index eff24cafb..f6b0cdc83 100644 --- a/interceptor/Dockerfile +++ b/interceptor/Dockerfile @@ -1,7 +1,8 @@ # adapted from Athens # https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile ARG GOLANG_VERSION=1.16 -ARG ALPINE_VERSION=3.11.5 +ARG GOARCH=amd64 +ARG GOOS=linux FROM golang:${GOLANG_VERSION}-alpine AS builder @@ -15,6 +16,8 @@ COPY . . ENV GO111MODULE=on ENV CGO_ENABLED=0 +ENV GOOS=${GOOS} +ENV GOARCH=${GOARCH} ENV GOPROXY="https://proxy.golang.org" RUN go build -o /bin/interceptor ./interceptor diff --git a/operator/Dockerfile b/operator/Dockerfile index 52b2dd407..e153a0661 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,6 +1,8 @@ # adapted from Athens # https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile ARG GOLANG_VERSION=1.16 +ARG GOARCH=amd64 +ARG GOOS=linux FROM golang:${GOLANG_VERSION}-alpine AS builder @@ -14,6 +16,8 @@ COPY . . ENV GO111MODULE=on ENV CGO_ENABLED=0 +ENV GOOS=${GOOS} +ENV GOARCH=${GOARCH} ENV GOPROXY="https://proxy.golang.org" # Build diff --git a/scaler/Dockerfile b/scaler/Dockerfile index 9b6365171..b5f2320c4 100644 --- a/scaler/Dockerfile +++ b/scaler/Dockerfile @@ -1,7 +1,9 @@ # taken from Athens # https://github.com/gomods/athens/blob/main/cmd/proxy/Dockerfile ARG GOLANG_VERSION=1.16 -ARG ALPINE_VERSION=3.11.5 +ARG GOARCH=amd64 +ARG GOOS=linux + FROM golang:${GOLANG_VERSION}-alpine AS builder @@ -15,6 +17,8 @@ COPY . . ENV GO111MODULE=on ENV CGO_ENABLED=0 +ENV GOOS=${GOOS} +ENV GOARCH=${GOARCH} ENV GOPROXY="https://proxy.golang.org" RUN go build -o /bin/scaler ./scaler