dockerfile but the image is planet-sized
This commit is contained in:
49
Dockerfile
Normal file
49
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user