2020-07-16 10:20:54 +02:00
|
|
|
FROM golang:1.14.5
|
2019-10-17 06:00:51 +02:00
|
|
|
|
2020-04-15 16:04:22 +02:00
|
|
|
ARG VERSION
|
|
|
|
ARG COMMIT
|
|
|
|
|
2019-10-17 06:00:51 +02:00
|
|
|
ADD . /go/src/github.com/goharbor/harbor-scanner-clair/
|
|
|
|
WORKDIR /go/src/github.com/goharbor/harbor-scanner-clair/
|
|
|
|
|
2019-12-05 10:52:37 +01:00
|
|
|
RUN export GOFLAGS=-mod=vendor GOOS=linux GO111MODULE=on CGO_ENABLED=0 && \
|
2020-04-15 16:04:22 +02:00
|
|
|
go build -ldflags "-X main.version=$VERSION -X main.commit=$COMMIT -X main.date=`date -u --iso-8601=seconds`" \
|
|
|
|
-o harbor-scanner-clair cmd/harbor-scanner-clair/main.go
|