Skip to content

Commit

Permalink
add target platform for dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: ashu8912 <[email protected]>
  • Loading branch information
ashu8912 committed Dec 17, 2024
1 parent c677ea6 commit b0d1060
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ FROM node:18@sha256:d0bbfdbad0bff8253e6159dcbee42141db4fc309365d5b8bcfce46ed7156
WORKDIR /headlamp-plugins

# Add a build argument for the desired plugin to be built
# Add multi-arch build arguments
ARG PLUGIN
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH

# Check if the PLUGIN argument is provided
RUN if [ -z "$PLUGIN" ]; then \
Expand Down Expand Up @@ -41,6 +45,7 @@ COPY --from=builder /headlamp-plugins/build/ /plugins/

LABEL org.opencontainers.image.source=https://github.com/headlamp-k8s/plugins
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.platform=$TARGETPLATFORM

# Set the default command to list the installed plugins
CMD ["sh", "-c", "echo Plugins installed at /plugins/:; ls /plugins/"]
CMD ["sh", "-c", "echo Plugins installed at /plugins/:; ls /plugins/"]

0 comments on commit b0d1060

Please sign in to comment.