File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,23 @@ FROM node:18@sha256:d0bbfdbad0bff8253e6159dcbee42141db4fc309365d5b8bcfce46ed7156
5
5
WORKDIR /headlamp-plugins
6
6
7
7
# Add a build argument for the desired plugin to be built
8
+ # Add multi-arch build arguments
8
9
ARG PLUGIN
10
+ ARG TARGETPLATFORM
11
+ ARG TARGETARCH
9
12
10
13
# Check if the PLUGIN argument is provided
11
14
RUN if [ -z "$PLUGIN" ]; then \
12
15
echo "Error: PLUGIN argument is required" ; \
13
16
exit 1; \
14
17
fi
15
18
19
+ # Enforce that TARGETARCH is specified
20
+ RUN if [ -z "$TARGETARCH" ]; then \
21
+ echo "Error: TARGETARCH argument is required" ; \
22
+ exit 1; \
23
+ fi
24
+
16
25
# Create a directory for the plugin build
17
26
RUN mkdir -p /headlamp-plugins/build/${PLUGIN}
18
27
@@ -41,6 +50,7 @@ COPY --from=builder /headlamp-plugins/build/ /plugins/
41
50
42
51
LABEL org.opencontainers.image.source=https://github.com/headlamp-k8s/plugins
43
52
LABEL org.opencontainers.image.licenses=MIT
53
+ LABEL org.opencontainers.image.platform=$TARGETPLATFORM
44
54
45
55
# Set the default command to list the installed plugins
46
56
CMD ["sh" , "-c" , "echo Plugins installed at /plugins/:; ls /plugins/" ]
You can’t perform that action at this time.
0 commit comments