Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}}
Comment thread
gambtho marked this conversation as resolved.
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"]