mirror of
https://github.com/the-programmers-hangout/swiftspiracy-bot.git
synced 2026-09-10 07:56:26 +02:00
use make in docker build to properly get buildinfo
This commit is contained in:
+3
-6
@@ -1,10 +1,7 @@
|
|||||||
FROM golang:alpine AS builder
|
FROM golang:alpine AS builder
|
||||||
RUN apk --update add ca-certificates
|
RUN apk --update add ca-certificates git make bash
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN go mod tidy
|
RUN go mod tidy
|
||||||
ENV DISCORD_BOT_TOKEN=""
|
RUN make bot
|
||||||
ENV GIT_COMMIT=""
|
ENTRYPOINT ["bin/bot"]
|
||||||
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"]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user