From 74a9046e091ac7fe6c1edd992563412aab68d939 Mon Sep 17 00:00:00 2001 From: hugoShaka Date: Tue, 14 Oct 2025 13:20:33 -0400 Subject: [PATCH] reduce targetplatform warnings --- integrations/access/Dockerfile | 3 ++- integrations/event-handler/Dockerfile | 3 ++- integrations/kube-agent-updater/Dockerfile | 3 ++- integrations/operator/Dockerfile | 3 ++- integrations/operator/Dockerfile.gha | 5 +++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/integrations/access/Dockerfile b/integrations/access/Dockerfile index 0840d6c8a99be..42d5692a6a4c8 100644 --- a/integrations/access/Dockerfile +++ b/integrations/access/Dockerfile @@ -19,7 +19,8 @@ RUN tar -xzvf /plugin.tar.gz && \ # Create the image with the build operator on the $TARGETPLATFORM # TARGETPLATFORM is provided by Docker/buildx -FROM --platform=${TARGETPLATFORM} ${BASE_IMAGE} +# --platform=${TARGETPLATFORM} is set by default and the docker linter complains if we set it. +FROM ${BASE_IMAGE} WORKDIR / COPY --from=extractor /teleport-plugin /usr/local/bin/teleport-plugin diff --git a/integrations/event-handler/Dockerfile b/integrations/event-handler/Dockerfile index 0840d6c8a99be..42d5692a6a4c8 100644 --- a/integrations/event-handler/Dockerfile +++ b/integrations/event-handler/Dockerfile @@ -19,7 +19,8 @@ RUN tar -xzvf /plugin.tar.gz && \ # Create the image with the build operator on the $TARGETPLATFORM # TARGETPLATFORM is provided by Docker/buildx -FROM --platform=${TARGETPLATFORM} ${BASE_IMAGE} +# --platform=${TARGETPLATFORM} is set by default and the docker linter complains if we set it. +FROM ${BASE_IMAGE} WORKDIR / COPY --from=extractor /teleport-plugin /usr/local/bin/teleport-plugin diff --git a/integrations/kube-agent-updater/Dockerfile b/integrations/kube-agent-updater/Dockerfile index c5bb2a63779f1..a97eea9cb3e58 100644 --- a/integrations/kube-agent-updater/Dockerfile +++ b/integrations/kube-agent-updater/Dockerfile @@ -30,7 +30,8 @@ RUN echo "Targeting $TARGETOS/$TARGETARCH" && \ # Create the image with the build operator on the $TARGETPLATFORM # TARGETPLATFORM is provided by Docker/buildx -FROM --platform=$TARGETPLATFORM $BASE_IMAGE +# --platform=${TARGETPLATFORM} is set by default and the docker linter complains if we set it. +FROM $BASE_IMAGE WORKDIR / COPY --from=builder /go/bin/teleport-kube-agent-updater . diff --git a/integrations/operator/Dockerfile b/integrations/operator/Dockerfile index 757f1ce0c1847..c70be3706038a 100644 --- a/integrations/operator/Dockerfile +++ b/integrations/operator/Dockerfile @@ -81,7 +81,8 @@ RUN echo "Targeting $TARGETOS/$TARGETARCH with CC=$COMPILER_NAME" && \ # Create the image with the build operator on the $TARGETPLATFORM # TARGETPLATFORM is provided by Docker/buildx -FROM --platform=$TARGETPLATFORM $BASE_IMAGE +# --platform=${TARGETPLATFORM} is set by default and the docker linter complains if we set it. +FROM $BASE_IMAGE WORKDIR / COPY --from=builder /go/bin/teleport-operator . diff --git a/integrations/operator/Dockerfile.gha b/integrations/operator/Dockerfile.gha index f8012173d8f37..fd442c4f51618 100644 --- a/integrations/operator/Dockerfile.gha +++ b/integrations/operator/Dockerfile.gha @@ -1,7 +1,7 @@ ARG BASE_IMAGE=gcr.io/distroless/cc-debian12 # BUILDPLATFORM is provided by Docker/buildx -FROM --platform=$BUILDPLATFORM docker.io/debian:12 as builder +FROM --platform=$BUILDPLATFORM docker.io/debian:12 AS builder ARG BUILDARCH ## Install dependencies. @@ -100,7 +100,8 @@ RUN case "$TARGETARCH" in \ # Create the image with the build operator on the $TARGETPLATFORM # TARGETPLATFORM is provided by Docker/buildx -FROM --platform=$TARGETPLATFORM $BASE_IMAGE +# --platform=${TARGETPLATFORM} is set by default and the docker linter complains if we set it. +FROM $BASE_IMAGE WORKDIR / COPY --from=builder /go/bin/teleport-operator .