We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11be14d commit 7a30017Copy full SHA for 7a30017
test/multi-sudo.Dockerfile
@@ -1,5 +1,8 @@
1
# syntax=docker/dockerfile:1
2
-FROM --platform=$BUILDPLATFORM golang:alpine AS build
+
3
+ARG ALPINE_VERSION=3.21
4
5
+FROM --platform=$BUILDPLATFORM alpine:${ALPINE_VERSION} AS build
6
ARG TARGETPLATFORM
7
ARG BUILDPLATFORM
8
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log
@@ -12,9 +15,9 @@ RUN apk --update --no-cache add \
12
15
&& rm -rf /tmp/* /var/cache/apk/*
13
16
14
17
USER buildx
-RUN sudo chown buildx. /log
18
+RUN sudo chown buildx: /log
19
USER root
20
-FROM alpine
21
+FROM alpine:${ALPINE_VERSION}
22
COPY --from=build /log /log
23
RUN ls -al /log
0 commit comments