mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 20:26:13 +01:00
072127a70c
This commit is to add the clair_version into the harbor images, then clair will use it in the user-agent, and helpful for the debugging. Signed-off-by: wang yan <wangyan@vmware.com>
8 lines
288 B
Docker
8 lines
288 B
Docker
FROM golang:1.9.2
|
|
|
|
ADD . /go/src/github.com/coreos/clair/
|
|
WORKDIR /go/src/github.com/coreos/clair/
|
|
|
|
RUN export CLAIR_VERSION=$(git describe --tag --always --dirty) && \
|
|
go build -ldflags "-X github.com/coreos/clair/pkg/version.Version=$CLAIR_VERSION" github.com/coreos/clair/cmd/clair
|