2018-09-14 21:22:09 +02:00
|
|
|
FROM golang:alpine as builder
|
2017-02-12 23:49:59 +01:00
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
2017-02-13 00:28:48 +01:00
|
|
|
ca-certificates \
|
2019-12-06 02:29:13 +01:00
|
|
|
git \
|
|
|
|
make
|
2017-02-12 23:49:59 +01:00
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2019-12-06 02:14:28 +01:00
|
|
|
RUN go get github.com/quay/clair/cmd/clair || true
|
|
|
|
|
2020-05-15 08:13:42 +02:00
|
|
|
ENV CLAIR_VERSION v2.1.3
|
2019-12-06 02:14:28 +01:00
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/quay/clair
|
|
|
|
|
|
|
|
RUN git checkout "${CLAIR_VERSION}"
|
|
|
|
|
2019-12-06 02:29:13 +01:00
|
|
|
RUN go install ./cmd/clair
|
2017-02-12 23:49:59 +01:00
|
|
|
|
2018-09-14 21:06:19 +02:00
|
|
|
FROM alpine:latest
|
2018-09-14 21:22:09 +02:00
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
rpm \
|
|
|
|
xz
|
|
|
|
|
2019-12-06 02:29:13 +01:00
|
|
|
COPY --from=builder /go/bin/clair /usr/bin/clair
|
2018-09-14 21:22:09 +02:00
|
|
|
|
2017-02-12 23:49:59 +01:00
|
|
|
ENTRYPOINT [ "clair" ]
|