Skip to content

Commit

Permalink
adding GOOS and GOARCH to the Dockerfiles (kedacore#186)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
  • Loading branch information
arschles committed Aug 18, 2021
1 parent e832aa1 commit ce11e3e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion interceptor/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down
4 changes: 4 additions & 0 deletions operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion scaler/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down

0 comments on commit ce11e3e

Please sign in to comment.