From 02fe540ca97fa9351dd4e0a4d74fa56e36331423 Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 21 Jun 2022 14:39:07 -0400 Subject: [PATCH] Use ghcr.io/distroless/static as base image This also updates the Windows nanoserver base image used by the entrypoint image, and updates the Go version used to build the combine command to the latest Go release 1.18.3. --- .ko.yaml | 2 +- tekton/publish.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.ko.yaml b/.ko.yaml index 32bcf9ba813..e11a59d5794 100644 --- a/.ko.yaml +++ b/.ko.yaml @@ -1,4 +1,4 @@ -defaultBaseImage: gcr.io/distroless/static:nonroot +defaultBaseImage: ghcr.io/distroless/static baseImageOverrides: # git-init uses a base image that includes Git, and supports running either # as root or as user nonroot with UID 65532. diff --git a/tekton/publish.yaml b/tekton/publish.yaml index cc15aef76b4..4c59fc8aa54 100644 --- a/tekton/publish.yaml +++ b/tekton/publish.yaml @@ -80,7 +80,7 @@ spec: cp ${DOCKER_CONFIG} /workspace/docker-config.json - name: create-ko-yaml - image: golang:1.17.8 + image: golang:1.18.3 script: | #!/bin/sh set -ex @@ -95,13 +95,13 @@ spec: # Combine Distroless with a Windows base image, used for the entrypoint image. COMBINED_BASE_IMAGE=$(go run ./vendor/github.com/tektoncd/plumbing/cmd/combine/main.go \ - gcr.io/distroless/static:nonroot \ - mcr.microsoft.com/windows/nanoserver:1809 \ + ghcr.io/distroless/static \ + mcr.microsoft.com/windows/nanoserver:ltsc2022 \ ${CONTAINER_REGISTRY}/$(params.package)/combined-base-image:latest) cat < ${PROJECT_ROOT}/.ko.yaml # This matches the value configured in .ko.yaml - defaultBaseImage: gcr.io/distroless/static:nonroot + defaultBaseImage: ghcr.io/distroless/static baseImageOverrides: # Use the combined base image for images that should include Windows support. $(params.package)/cmd/entrypoint: ${COMBINED_BASE_IMAGE}