2018-09-14 21:06:19 +02:00
|
|
|
FROM alpine:latest as builder
|
2017-02-12 23:49:59 +01:00
|
|
|
|
|
|
|
RUN apk --no-cache add \
|
2017-02-13 00:28:48 +01:00
|
|
|
bzr \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
rpm \
|
|
|
|
xz
|
2017-02-12 23:49:59 +01:00
|
|
|
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
go \
|
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
|
|
|
' \
|
|
|
|
set -x \
|
|
|
|
&& apk --no-cache add $buildDeps \
|
|
|
|
&& go get github.com/coreos/clair/cmd/clair \
|
|
|
|
&& echo "Build complete."
|
|
|
|
|
2018-09-14 21:06:19 +02:00
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /go/bin/clair /usr/bin/clair
|
2018-09-14 21:10:19 +02:00
|
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
2017-02-12 23:49:59 +01:00
|
|
|
ENTRYPOINT [ "clair" ]
|