Skip to content

Commit

Permalink
Merge pull request #212 from Dash-Industry-Forum/dockerfile-with-version
Browse files Browse the repository at this point in the history
feat: improve Dockerfile to insert Version from github into livesim2
  • Loading branch information
tobbee authored Oct 1, 2024
2 parents 10a898e + 86687ac commit 70363a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FROM golang:1.21.3-alpine3.18 AS BuildStage
WORKDIR /work
COPY . .
RUN go mod download
RUN go build -o ./out/livesim2 ./cmd/livesim2/main.go
RUN go build -ldflags "-X github.com/Dash-Industry-Forum/livesim2/internal.commitVersion=$$(git describe --tags HEAD) -X github.com/Dash-Industry-Forum/livesim2/internal.commitDate=$$(git log -1 --format=%ct)" -o ./out/livesim2 ./cmd/livesim2/main.go
# Deploy Stage
FROM alpine:latest
WORKDIR /
Expand Down

0 comments on commit 70363a7

Please sign in to comment.