Merge pull request #1284 from crazy-max/dockerfiles-pin-bases

test: fix multi-sudo dockerfile
pull/1282/head
CrazyMax 2024-12-17 16:18:44 +01:00 committed by GitHub
commit bcc9f4afe7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build
FROM --platform=$BUILDPLATFORM alpine AS build
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
@ -12,7 +13,7 @@ RUN apk --update --no-cache add \
&& rm -rf /tmp/* /var/cache/apk/*
USER buildx
RUN sudo chown buildx. /log
RUN sudo chown buildx: /log
USER root
FROM alpine