Skip to content

Commit

Permalink
feat: Add VERSION argument to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rluisr committed Feb 12, 2024
1 parent 5875f91 commit 18e7d6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax = docker/dockerfile:1.3-labs

ARG APP_NAME="tvbit-bot"
ARG VERSION=0.0.0

FROM golang:1 as builder

Expand All @@ -10,7 +11,7 @@ COPY go.* .
RUN --mount=type=cache,target=/root/.cache/go-build go mod download

COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /app cmd/main.go
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-X github.com/rluisr/tvbit-bot/pkg/external.version=${VERSION}" -o /app cmd/main.go

FROM gcr.io/distroless/static-debian12 as production

Expand Down

0 comments on commit 18e7d6f

Please sign in to comment.