mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2025-02-17 09:37:49 +01:00
make clair/Dockerfile use build stages (#423)
This commit is contained in:
parent
938d2986dc
commit
2d839cd5ac
|
@ -1,4 +1,4 @@
|
||||||
FROM alpine:latest
|
FROM alpine:latest as builder
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
bzr \
|
bzr \
|
||||||
|
@ -20,9 +20,8 @@ RUN buildDeps=' \
|
||||||
set -x \
|
set -x \
|
||||||
&& apk --no-cache add $buildDeps \
|
&& apk --no-cache add $buildDeps \
|
||||||
&& go get github.com/coreos/clair/cmd/clair \
|
&& go get github.com/coreos/clair/cmd/clair \
|
||||||
&& mv /go/bin/clair /usr/bin/clair \
|
|
||||||
&& apk del $buildDeps \
|
|
||||||
&& rm -rf /go \
|
|
||||||
&& echo "Build complete."
|
&& echo "Build complete."
|
||||||
|
|
||||||
|
FROM alpine:latest
|
||||||
|
COPY --from=builder /go/bin/clair /usr/bin/clair
|
||||||
ENTRYPOINT [ "clair" ]
|
ENTRYPOINT [ "clair" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user