1
0

ditching ffmpeg, acceptable image size

This commit is contained in:
2021-01-28 16:25:59 +01:00
parent 57249618c0
commit 939692e531
2 changed files with 7 additions and 7 deletions

View File

@ -1,3 +1,4 @@
# building the go program
FROM golang:1.15.6-alpine AS builder
RUN apk add --no-cache git
ENV GO111MODULE=on \
@ -12,12 +13,13 @@ COPY main.go ./
COPY core ./core/
RUN go build -o gogodiscordo
# 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"]
@ -27,19 +29,17 @@ RUN set -ex;\
apt install -y --no-install-recommends \
mbrola \
espeak-ng \
ffmpeg \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/mbrola/
COPY --from=builder /src/gogodiscordo /app/
COPY config.yaml /app/
RUN mkdir -p /usr/share/mbrola/
COPY --from=alpine_voices /tmp/MBROLA-voices-master/data/fr* /usr/share/mbrola/
VOLUME ["/app"]
RUN useradd -d /app appuser
WORKDIR /app
CMD ["./gogodiscordo"]