1
0

dockerfile but the image is planet-sized

This commit is contained in:
2021-01-27 20:41:47 +01:00
parent a47f6b2df1
commit 3b443c2001
4 changed files with 58 additions and 83 deletions

49
Dockerfile Normal file
View File

@ -0,0 +1,49 @@
FROM golang:1.15.6-alpine AS builder
RUN apk add --no-cache git
ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY main.go ./
COPY core ./core/
RUN go build -o gogodiscordo
FROM ubuntu:focal
SHELL ["/bin/bash", "-c"]
RUN set -ex;\
apt update
RUN set -ex;\
apt install -y --no-install-recommends \
mbrola \
espeak-ng \
wget \
unzip;
RUN wget --no-check-certificate https://github.com/numediart/MBROLA-voices/archive/master.zip
RUN unzip master.zip
RUN mkdir -p /usr/share/mbrola/
RUN cp -r MBROLA-voices-master/data/* /usr/share/mbrola/
COPY --from=builder /src/gogodiscordo /app/
COPY core/ app/core
VOLUME ["/app"]
RUN useradd -d /app appuser
RUN apt install -y ca-certificates
RUN apt install -y --no-install-recommends ffmpeg
COPY config.yaml /app/
RUN rm master.zip
RUN apt clean -y
WORKDIR /app
CMD ["./gogodiscordo"]