From ffde6e381423cfe23ef7c9d5f20c3d8aff80dba2 Mon Sep 17 00:00:00 2001 From: Tyler Stiene Date: Mon, 1 Feb 2021 16:11:12 -0500 Subject: [PATCH] update docker build --- .dockerignore | 2 ++ Dockerfile | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..8c5bcf6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.env +dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0420057..da01798 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,15 +5,15 @@ FROM golang:1.15 as builder WORKDIR /go/src/app COPY . . - -RUN go build -o mumble-discord-bridge -ldflags="-extldflags=-static" *.go +RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh +RUN ./bin/goreleaser build --skip-validate # Stage 2 FROM alpine:latest as static WORKDIR /opt/ RUN apk add opus -COPY --from=builder /go/src/app/mumble-discord-bridge . +COPY --from=builder /go/src/app/dist/mumble-discord-bridge_linux_amd64/mumble-discord-bridge . # Entry Point CMD ["/opt/mumble-discord-bridge"]