-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathContainerfile
30 lines (22 loc) · 927 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/ubi-minimal:latest AS collect
RUN mkdir /download
COPY download/* /download/
WORKDIR /download
RUN \
ls -lR && \
mkdir -p linux/arm64 && \
mkdir -p linux/amd64 && \
mv csaf-aarch64-unknown-linux-gnu linux/arm64/csaf && \
mv sbom-aarch64-unknown-linux-gnu linux/arm64/sbom && \
mv csaf-x86_64-unknown-linux-gnu linux/amd64/csaf && \
mv sbom-x86_64-unknown-linux-gnu linux/amd64/sbom
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
LABEL org.opencontainers.image.source="https://github.com/ctron/csaf-walker"
ARG TARGETPLATFORM
#RUN microdnf update -y && microdnf install -y jq
RUN echo ${TARGETPLATFORM}
COPY --from=collect /download/${TARGETPLATFORM}/csaf /usr/local/bin/
COPY --from=collect /download/${TARGETPLATFORM}/sbom /usr/local/bin/
RUN \
chmod a+x /usr/local/bin/csaf && \
chmod a+x /usr/local/bin/sbom