Skip to content

Commit

Permalink
create autoscale-go image (knative#5554)
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Jun 5, 2023
1 parent f1d8285 commit 35db02c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/serving/autoscaling/autoscale-go/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@

FROM golang AS builder

ARG TARGETOS
ARG TARGETARCH

WORKDIR /go/src/app
COPY . /go/src/app
RUN CGO_ENABLED=0 go build -o /bin/autoscale-go .
RUN CGO_ENABLED=0 go build -o /bin/load-generator ./test

RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /bin/autoscale-go .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /bin/load-generator ./test

FROM gcr.io/distroless/base
EXPOSE 8080
Expand Down
3 changes: 3 additions & 0 deletions docs/serving/autoscaling/autoscale-go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module autoscale-go

go 1.20

0 comments on commit 35db02c

Please sign in to comment.