Skip to content

Commit 7a30017

Browse files
committed
test: fix multi-sudo dockerfile
Signed-off-by: CrazyMax <[email protected]>
1 parent 11be14d commit 7a30017

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/multi-sudo.Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# syntax=docker/dockerfile:1
2-
FROM --platform=$BUILDPLATFORM golang:alpine AS build
2+
3+
ARG ALPINE_VERSION=3.21
4+
5+
FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS build
36
ARG TARGETPLATFORM
47
ARG BUILDPLATFORM
58
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
@@ -12,9 +15,9 @@ RUN apk --update --no-cache add \
1215
&& rm -rf /tmp/* /var/cache/apk/*
1316

1417
USER buildx
15-
RUN sudo chown buildx. /log
18+
RUN sudo chown buildx: /log
1619
USER root
1720

18-
FROM alpine
21+
FROM alpine:${ALPINE_VERSION}
1922
COPY --from=build /log /log
2023
RUN ls -al /log

0 commit comments

Comments
 (0)