Skip to content
Open
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
7 changes: 4 additions & 3 deletions ko/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM golang:1.16 AS kosource
ARG GO_VERSION=1.26
FROM golang:${GO_VERSION} AS kosource
ARG KO_GIT_TAG

RUN git clone --depth=1 -b "${KO_GIT_TAG}" https://github.com/google/ko
RUN git clone -b "${KO_GIT_TAG}" https://github.com/google/ko
WORKDIR ko
RUN GOOS=linux go build -mod=vendor -o /bin/ko ./cmd/ko
RUN go mod tidy && go mod vendor && GOOS=linux go build -mod=vendor -ldflags "-s -w -X github.com/google/ko/pkg/commands.Version=${KO_GIT_TAG}" -o /bin/ko main.go

FROM gcr.io/cloud-builders/kubectl

Expand Down