Skip to content

Commit

Permalink
Update go version
Browse files Browse the repository at this point in the history
  • Loading branch information
gambtho committed Sep 24, 2024
1 parent 118621f commit 0833a0e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion template/dockerfiles/go/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM golang:{{.VERSION}}
ENV PORT {{.PORT}}
ENV PORT={{.PORT}}
EXPOSE {{.PORT}}

WORKDIR /go/src/app
Expand Down
4 changes: 2 additions & 2 deletions template/dockerfiles/go/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ variables:
type: "string"
kind: "containerImageVersion"
default:
value: "1.18"
value: "1.23"
description: "the version of go used by the application"
exampleValues: ["1.16", "1.17", "1.18", "1.19"]
exampleValues: ["1.20", "1.21", "1.22", "1.23"]
6 changes: 4 additions & 2 deletions template/dockerfiles/gomodule/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM golang:{{.VERSION}} AS builder
ENV PORT {{.PORT}}
EXPOSE {{.PORT}}

WORKDIR /build
COPY go.mod go.sum ./
Expand All @@ -9,6 +7,10 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -v -o app-binary

FROM gcr.io/distroless/static-debian12

ENV PORT={{.PORT}}
EXPOSE {{.PORT}}

WORKDIR /app
COPY --from=builder /build/app-binary .
CMD ["/app/app-binary"]
4 changes: 2 additions & 2 deletions template/dockerfiles/gomodule/draft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ variables:
type: "string"
kind: "containerImageVersion"
default:
value: "1.18"
value: "1.23"
description: "the version of go used by the application"
exampleValues: ["1.16", "1.17", "1.18", "1.19"]
exampleValues: ["1.20", "1.21", "1.22", "1.23"]

0 comments on commit 0833a0e

Please sign in to comment.