53 lines
1.0 KiB
Docker
Executable File
53 lines
1.0 KiB
Docker
Executable File
# downloading mbrola voice
|
|
FROM alpine as alpine_voices
|
|
WORKDIR /tmp
|
|
RUN wget --no-check-certificate https://github.com/numediart/MBROLA-voices/archive/master.zip \
|
|
&& unzip master.zip && rm master.zip
|
|
|
|
|
|
# final image
|
|
FROM ubuntu:focal as ubuntu1
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN set -ex;\
|
|
apt update && \
|
|
apt install -y --no-install-recommends \
|
|
mbrola \
|
|
espeak-ng \
|
|
ca-certificates \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN mkdir -p /usr/share/mbrola/
|
|
|
|
|
|
# setting up builder
|
|
FROM golang:1.15.6-alpine AS builder
|
|
RUN apk add --no-cache git
|
|
|
|
# compiling the go project
|
|
FROM builder as builder2
|
|
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 ubuntu1 as ubuntu2
|
|
COPY --from=builder2 /src/gogodiscordo /app/
|
|
COPY config.yaml /app/
|
|
COPY --from=alpine_voices /tmp/MBROLA-voices-master/data/fr* /usr/share/mbrola/
|
|
|
|
VOLUME ["/app"]
|
|
|
|
WORKDIR /app
|
|
CMD ["./gogodiscordo"]
|