mirror of
https://github.com/docker/build-push-action.git
synced 2024-12-25 23:31:01 +08:00
test: fix multi-sudo dockerfile
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
11be14d908
commit
da5b6c75b9
@ -1,5 +1,6 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
|
||||||
|
FROM --platform=$BUILDPLATFORM alpine AS build
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
|
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/*
|
&& rm -rf /tmp/* /var/cache/apk/*
|
||||||
|
|
||||||
USER buildx
|
USER buildx
|
||||||
RUN sudo chown buildx. /log
|
RUN sudo chown buildx: /log
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
Loading…
x
Reference in New Issue
Block a user