This repository has been archived on 2019-06-23. You can view files and clone it, but cannot push or open issues/pull-requests.
mumbledj/Dockerfile

40 lines
1006 B
Docker
Raw Permalink Normal View History

2019-06-02 11:05:11 +02:00
FROM golang:alpine as builder
RUN apk add --no-cache \
build-base \
opus-dev
COPY . /go/src/github.com/matthieugrieger/mumbledj
WORKDIR /go/src/github.com/matthieugrieger/mumbledj
RUN go get -v \
&& go build -v -ldflags="-s -w"
2019-03-25 16:24:07 +01:00
FROM alpine
2019-06-02 11:05:11 +02:00
RUN adduser -D mumbledj
RUN apk add --no-cache \
aria2 \
libressl \
python2
2019-06-02 11:05:11 +02:00
RUN wget -O /usr/bin/youtube-dl https://yt-dl.org/downloads/latest/youtube-dl \
&& chmod +x /usr/bin/youtube-dl
2019-06-02 11:05:11 +02:00
RUN wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz \
&& tar xvf ffmpeg-git-amd64-static.tar.xz '*/ffmpeg' || true \
&& mv ffmpeg-git-*-amd64-static/ffmpeg /usr/bin/ffmpeg \
2019-06-02 11:05:11 +02:00
&& rm -rf ffmpeg-git-* \
&& apk add --no-cache upx \
&& upx /usr/bin/ffmpeg \
&& apk del upx
2019-06-02 11:05:11 +02:00
COPY --from=builder /go/src/github.com/matthieugrieger/mumbledj/mumbledj /usr/bin/mumbledj
2019-06-02 11:05:11 +02:00
COPY config.yaml /home/mumbledj/.config/mumbledj/config.yaml
2019-06-02 11:05:11 +02:00
USER mumbledj
2019-06-02 11:05:11 +02:00
ENTRYPOINT ["/usr/bin/mumbledj"]