From dc2ce21fef48444358605a12e196cd3dd9fe0bf9 Mon Sep 17 00:00:00 2001 From: Vikas Date: Sun, 30 Jun 2024 13:12:34 +0530 Subject: [PATCH] Add version information to docker image --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ba283a9..d85eaf6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ COPY go.mod go.sum ./ RUN go mod download COPY . ./ -RUN CGO_ENABLED=0 go build -o /out/pastepass main.go +ARG VERSION=0.00-dev +RUN CGO_ENABLED=0 go build -o /out/pastepass -ldflags "-X 'github.com/v1k45/pastepass/config.Version=$VERSION'" FROM alpine:3.19