2020-10-29 02:21:07 -04:00
|
|
|
# syntax=docker/dockerfile:experimental
|
|
|
|
|
|
|
|
# Stage 1
|
|
|
|
|
2020-11-11 23:38:54 -05:00
|
|
|
FROM golang:1.15 as builder
|
2020-10-29 02:21:07 -04:00
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN go build -o mumble-discord-bridge -ldflags="-extldflags=-static" *.go
|
|
|
|
|
|
|
|
# Stage 2
|
|
|
|
|
|
|
|
FROM alpine:latest as static
|
|
|
|
WORKDIR /opt/
|
|
|
|
RUN apk add opus
|
|
|
|
COPY --from=builder /go/src/app/mumble-discord-bridge .
|
|
|
|
|
|
|
|
# Entry Point
|
|
|
|
CMD ["/opt/mumble-discord-bridge"]
|