|
1 |
| -FROM gcr.io/distroless/static-debian11:debug@sha256:a0a404776dec98be120089ae42bbdfbe48c177921d856937d124d48eb8c0b951 AS build |
| 1 | +FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.21 AS build |
2 | 2 |
|
3 |
| -FROM scratch |
4 |
| -# needed for version check HTTPS request |
5 |
| -COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt |
| 3 | +WORKDIR /src/syft |
| 4 | + |
| 5 | +# openshift-golang-builder sets GOFLAGS=-mod=vendor, unset it (we don't vendor dependencies) |
| 6 | +ENV GOFLAGS="" |
| 7 | + |
| 8 | +COPY go.mod go.sum . |
| 9 | +RUN go mod download |
| 10 | + |
| 11 | +COPY . . |
| 12 | +RUN ./build-syft-binary.sh |
| 13 | + |
| 14 | +FROM registry.access.redhat.com/ubi9/ubi-micro:9.4-6.1716471860@sha256:1c8483e0fda0e990175eb9855a5f15e0910d2038dd397d9e2b357630f0321e6d |
| 15 | + |
| 16 | +ENV SYFT_CHECK_FOR_APP_UPDATE=false |
6 | 17 |
|
7 | 18 | # create the /tmp dir, which is needed for image content cache
|
8 | 19 | WORKDIR /tmp
|
9 | 20 |
|
10 |
| -COPY syft / |
11 |
| - |
12 |
| -ARG BUILD_DATE |
13 |
| -ARG BUILD_VERSION |
14 |
| -ARG VCS_REF |
15 |
| -ARG VCS_URL |
| 21 | +COPY --from=build /src/syft/dist/syft /usr/local/bin/syft |
16 | 22 |
|
17 |
| -LABEL org.opencontainers.image.created=$BUILD_DATE |
18 | 23 | LABEL org.opencontainers.image.title="syft"
|
19 | 24 | LABEL org.opencontainers.image.description="CLI tool and library for generating a Software Bill of Materials from container images and filesystems"
|
20 |
| -LABEL org.opencontainers.image.source=$VCS_URL |
21 |
| -LABEL org.opencontainers.image.revision=$VCS_REF |
22 |
| -LABEL org.opencontainers.image.vendor="Anchore, Inc." |
23 |
| -LABEL org.opencontainers.image.version=$BUILD_VERSION |
| 25 | +LABEL org.opencontainers.image.vendor="Red Hat, Inc." |
24 | 26 | LABEL org.opencontainers.image.licenses="Apache-2.0"
|
25 |
| -LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/anchore/syft/main/README.md" |
26 |
| -LABEL io.artifacthub.package.logo-url="https://user-images.githubusercontent.com/5199289/136844524-1527b09f-c5cb-4aa9-be54-5aa92a6086c1.png" |
27 |
| -LABEL io.artifacthub.package.license="Apache-2.0" |
28 | 27 |
|
29 |
| -ENTRYPOINT ["/syft"] |
| 28 | +# required per https://github.com/release-engineering/rhtap-ec-policy/blob/main/data/rule_data.yml |
| 29 | +# TODO: set up in Bugzilla |
| 30 | +LABEL com.redhat.component="syft" |
| 31 | +LABEL version="1.8.0" |
| 32 | +# TODO: document the need to bump this on every re-release of the same version |
| 33 | +LABEL release="1" |
| 34 | +LABEL name="syft" |
| 35 | +LABEL io.k8s.display-name="syft" |
| 36 | +LABEL summary="syft" |
| 37 | +LABEL description="CLI tool and library for generating a Software Bill of Materials from container images and filesystems" |
| 38 | +LABEL io.k8s.description="CLI tool and library for generating a Software Bill of Materials from container images and filesystems" |
| 39 | +LABEL vendor="Red Hat, Inc." |
| 40 | +LABEL url="https://github.com/redhat-appstudio/rh-syft" |
| 41 | +LABEL distribution-scope="public" |
| 42 | + |
| 43 | +ENTRYPOINT ["/usr/local/bin/syft"] |
0 commit comments