From d72898e2372cd790af64c24d802d1deeeaa0a641 Mon Sep 17 00:00:00 2001 From: Faisal Memon Date: Tue, 27 Aug 2024 18:37:49 -0700 Subject: [PATCH 1/2] Update to go 1.22.3, fix Dockerfile warnings Signed-off-by: Faisal Memon --- .github/tests/it/spiffe-helper/Dockerfile | 2 +- Dockerfile | 6 +++--- go.mod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/tests/it/spiffe-helper/Dockerfile b/.github/tests/it/spiffe-helper/Dockerfile index d7fbedef..bd982ae2 100644 --- a/.github/tests/it/spiffe-helper/Dockerfile +++ b/.github/tests/it/spiffe-helper/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22.1-alpine AS spiffe-helper +FROM golang:1.22.3-alpine AS spiffe-helper COPY ./ /service/ WORKDIR /service RUN go build -tags netgo -a -v -o /service/spiffe-helper ./cmd/spiffe-helper diff --git a/Dockerfile b/Dockerfile index 46f7c71f..44b1c371 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Build the spiffe-helper binary -ARG go_version -FROM --platform=$BUILDPLATFORM golang:${go_version}-alpine as base +ARG go_version=1.22.3 +FROM --platform=$BUILDPLATFORM golang:${go_version}-alpine AS base WORKDIR /workspace # Cache deps before building and copying source so that we don't need to re-download as much @@ -18,7 +18,7 @@ COPY pkg/ pkg/ # crane digest tonistiigi/xx:1.3.0 FROM --platform=${BUILDPLATFORM} tonistiigi/xx@sha256:904fe94f236d36d65aeb5a2462f88f2c537b8360475f6342e7599194f291fb7e AS xx -FROM --platform=${BUILDPLATFORM} base as builder +FROM --platform=${BUILDPLATFORM} base AS builder ARG TARGETPLATFORM ARG TARGETARCH diff --git a/go.mod b/go.mod index ef4b6abb..9ffe7a3b 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/spiffe/spiffe-helper -go 1.22.1 +go 1.22.3 require ( github.com/hashicorp/hcl v1.0.0 From cbf079fd8b3a2ff774a07ee70506ec2951574d06 Mon Sep 17 00:00:00 2001 From: Faisal Memon Date: Fri, 6 Sep 2024 23:18:43 -0700 Subject: [PATCH 2/2] Remove default version from dockerfile Signed-off-by: Faisal Memon --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 44b1c371..5d1dbbd0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the spiffe-helper binary -ARG go_version=1.22.3 +ARG go_version FROM --platform=$BUILDPLATFORM golang:${go_version}-alpine AS base WORKDIR /workspace