2023-11-25 19:05:26 +00:00
|
|
|
FROM golang:1.21-alpine3.18 as builder
|
2023-11-03 00:17:05 +00:00
|
|
|
|
2023-11-25 19:05:26 +00:00
|
|
|
RUN apk update && apk upgrade --no-cache && \
|
|
|
|
apk add build-base pkgconfig ffmpeg-dev opus-dev opusfile-dev
|
2023-03-30 16:44:53 +00:00
|
|
|
WORKDIR /src
|
|
|
|
COPY . .
|
2023-11-25 19:05:26 +00:00
|
|
|
RUN CGO_ENABLED=1 go build
|
|
|
|
|
|
|
|
FROM alpine:3.18
|
|
|
|
RUN apk update && apk upgrade --no-cache && \
|
|
|
|
apk add ffmpeg-libs opus-dev opusfile-dev
|
2023-03-30 16:44:53 +00:00
|
|
|
COPY --from=builder /src/dndmusicbot /app/
|
|
|
|
ADD tmpl /app/tmpl
|
|
|
|
WORKDIR /app
|
|
|
|
ENTRYPOINT [ "/app/dndmusicbot" ]
|