From 966959988bd750735537b2a8202b5b5b63ba852e Mon Sep 17 00:00:00 2001 From: Troels Liebe Bentsen Date: Thu, 25 May 2023 13:12:24 +0200 Subject: [PATCH 1/2] Add buildx as it was removed in docker 23 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5c09179..4aeb867 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,6 +60,8 @@ FROM gcr.io/cloud-builders/docker as docker-kms ARG SSH_KEY_PATH +RUN apt-get update && apt-get install -y --no-install-recommends docker-buildx-plugin && apt-get clean -y && rm -rf /var/lib/apt/lists/* + COPY --from=builder /app/auth-wrapper /opt/bin/auth-wrapper RUN ln -s /opt/bin/auth-wrapper /opt/bin/docker From 52d69a9e54b4560fcec0f645c86a9bfe7e0b284a Mon Sep 17 00:00:00 2001 From: Troels Liebe Bentsen Date: Thu, 25 May 2023 13:17:39 +0200 Subject: [PATCH 2/2] Make SonarCloud happy --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4aeb867..30587e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG WRAP_COMMAND ARG SSH_KEY_PATH # Build image -FROM gcr.io/cloud-builders/go:latest as builder +FROM gcr.io/cloud-builders/go:latest AS builder ARG VERSION="1.0-dev" @@ -25,7 +25,7 @@ RUN echo nobody:x:65534:65534:nobody:/: > password.minimal # # Auth-wrapper server image # -FROM scratch as main +FROM scratch AS main ARG SSH_KEY_PATH @@ -39,7 +39,7 @@ ENTRYPOINT ["/opt/bin/auth-wrapper"] # # Authwrapped git with KMS keys # -FROM gcr.io/cloud-builders/git as git-kms +FROM gcr.io/cloud-builders/git AS git-kms ARG SSH_KEY_PATH @@ -56,7 +56,7 @@ ENTRYPOINT ["/opt/bin/git"] # # Authwrapped docker with KMS keys # -FROM gcr.io/cloud-builders/docker as docker-kms +FROM gcr.io/cloud-builders/docker AS docker-kms ARG SSH_KEY_PATH @@ -76,7 +76,7 @@ ENTRYPOINT ["/opt/bin/docker"] # # Authwrapped git with local keys # -FROM gcr.io/cloud-builders/git as git-local +FROM gcr.io/cloud-builders/git AS git-local COPY --from=builder /app/auth-wrapper /opt/bin/auth-wrapper RUN ln -s /opt/bin/auth-wrapper /opt/bin/git