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 \
|
2018-09-14 21:22:09 +02:00
|
|
|
git
|
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
|
|
|
|
|
|
|
|
ENV CLAIR_VERSION v2.1.1
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/quay/clair
|
|
|
|
|
|
|
|
RUN git checkout "${CLAIR_VERSION}"
|
|
|
|
|
|
|
|
RUN make build
|
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:14:28 +01:00
|
|
|
COPY --from=builder /go/src/github.com/coreos/clair/cmd/clair /usr/bin/clair
|
2018-09-14 21:22:09 +02:00
|
|
|
|
2017-02-12 23:49:59 +01:00
|
|
|
ENTRYPOINT [ "clair" ]
|