multi-stages dockerfile, still big but way better
This commit is contained in:
32
Dockerfile
32
Dockerfile
@ -13,37 +13,33 @@ COPY core ./core/
|
||||
RUN go build -o gogodiscordo
|
||||
|
||||
|
||||
FROM ubuntu:focal
|
||||
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
|
||||
|
||||
FROM ubuntu:focal as ubuntu1
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
RUN set -ex;\
|
||||
apt update
|
||||
|
||||
RUN set -ex;\
|
||||
apt update && \
|
||||
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/
|
||||
ffmpeg \
|
||||
ca-certificates \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /src/gogodiscordo /app/
|
||||
COPY core/ app/core
|
||||
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
|
||||
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"]
|
||||
|
||||
Reference in New Issue
Block a user