-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
34 lines (30 loc) · 1.2 KB
/
Dockerfile
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
31
32
33
34
FROM golang:1.16-alpine AS builder
WORKDIR /go/src/github.com/Portshift/klar/
COPY ./ ./
RUN CGO_ENABLED=0 go build -o klar .
FROM registry.access.redhat.com/ubi8
RUN yum install ca-certificates -y
RUN mkdir /licenses
COPY ./LICENSE /licenses/
RUN mkdir /app
COPY --from=builder /go/src/github.com/Portshift/klar/klar /app/
RUN chmod +x /app/klar
ENTRYPOINT ["/app/klar"]
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="klar" \
org.label-schema.description="A tool to analyze images stored in a private or public Docker registry for security vulnerabilities using Grype" \
org.label-schema.url="https://github.com/Portshift/klar" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/Portshift/klar"
### Required OpenShift Labels
ARG IMAGE_VERSION
LABEL name="klar" \
vendor="Portshift" \
version=${IMAGE_VERSION} \
release=${IMAGE_VERSION} \
summary="Integration of Grype and Docker Registry" \
description="A tool to analyze images stored in a private or public Docker registry for security vulnerabilities using Grype"
USER 1000