diff --git a/.gitignore b/.gitignore index 219c011..ce414eb 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,6 @@ secrets.json # Private/internal files .private/ + +# Local Tekton PipelineRuns (ECR details, not for upstream) +.tekton/ diff --git a/Dockerfile b/Dockerfile index 11956e1..4337230 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ # Build stage FROM golang:1.21-alpine AS builder +ARG VERSION=dev +ARG COMMIT=none +ARG DATE=unknown + WORKDIR /app # Copy go mod files @@ -11,7 +15,9 @@ RUN go mod download COPY . . # Build -RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o cryptoscan ./cmd/cryptoscan +RUN CGO_ENABLED=0 GOOS=linux go build \ + -ldflags="-s -w -X main.version=${VERSION} -X main.commit=${COMMIT} -X main.date=${DATE}" \ + -o cryptoscan ./cmd/cryptoscan # Runtime stage FROM alpine:3.19