2020-10-29 02:21:07 -04:00
|
|
|
# syntax=docker/dockerfile:experimental
|
|
|
|
|
|
|
|
# Stage 1
|
|
|
|
|
2021-04-24 18:32:54 -04:00
|
|
|
FROM golang:1.16 as builder
|
2020-10-29 02:21:07 -04:00
|
|
|
WORKDIR /go/src/app
|
|
|
|
COPY . .
|
2021-02-01 16:11:12 -05:00
|
|
|
RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh
|
2021-04-24 18:32:54 -04:00
|
|
|
RUN apt update && apt install -y libopus-dev
|
2021-02-01 16:11:12 -05:00
|
|
|
RUN ./bin/goreleaser build --skip-validate
|
2020-10-29 02:21:07 -04:00
|
|
|
|
|
|
|
# Stage 2
|
|
|
|
|
2021-04-24 18:32:54 -04:00
|
|
|
FROM alpine:latest as final
|
2020-10-29 02:21:07 -04:00
|
|
|
WORKDIR /opt/
|
|
|
|
RUN apk add opus
|
2021-04-24 18:32:54 -04:00
|
|
|
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
|
2021-02-01 16:11:12 -05:00
|
|
|
COPY --from=builder /go/src/app/dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge .
|
2020-10-29 02:21:07 -04:00
|
|
|
|
2021-04-24 18:32:54 -04:00
|
|
|
# FROM ubuntu:latest as final
|
|
|
|
# WORKDIR /opt/
|
|
|
|
# RUN apt update && apt install -y libopus0 ca-certificates && apt clean
|
|
|
|
# COPY --from=builder /go/src/app/dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge .
|
|
|
|
|
2020-10-29 02:21:07 -04:00
|
|
|
# Entry Point
|
|
|
|
CMD ["/opt/mumble-discord-bridge"]
|