use make in docker build to properly get buildinfo

This commit is contained in:
Khinshan Khan
2025-04-01 23:08:48 -04:00
parent 2e583106ea
commit 3c72b8c0c3
+3 -6
View File
@@ -1,10 +1,7 @@
FROM golang:alpine AS builder
RUN apk --update add ca-certificates
RUN apk --update add ca-certificates git make bash
WORKDIR /app
COPY . ./
RUN go mod tidy
ENV DISCORD_BOT_TOKEN=""
ENV GIT_COMMIT=""
ENV BUILD_DATE=""
RUN go build -ldflags="-s -w -X main.CommitHash=$GIT_COMMIT -X main.BuildDate=$BUILD_DATE" -o bin/swiftspiracybot cmd/bot/main.go
ENTRYPOINT ["bin/swiftspiracybot"]
RUN make bot
ENTRYPOINT ["bin/bot"]