-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
65 lines (59 loc) · 2.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM golang:1.22 AS build-go
WORKDIR /build
FROM gcc AS build-c
WORKDIR /build
FROM build-go AS aliyunpan-build
ENV ALIYUNPAN_VERSION 0.3.4
RUN wget https://github.com/tickstep/aliyunpan/archive/refs/tags/v${ALIYUNPAN_VERSION}.tar.gz -O aliyunpan.tar.gz && \
tar -xzf aliyunpan.tar.gz --strip 1 && \
go build -o /aliyunpan
FROM build-go AS baidupcs-build
ENV BAIDUPCS_VERSION 3.9.5
RUN wget https://github.com/qjfoidnh/BaiduPCS-Go/archive/refs/tags/v${BAIDUPCS_VERSION}.tar.gz -O baidupcs.tar.gz && \
tar -xzf baidupcs.tar.gz --strip 1 && \
go build -o /baidupcs
FROM build-c AS danmaku-factory-build
ENV DANMAKU_FACTORY_VERSION 1.70
RUN wget https://github.com/hihkm/DanmakuFactory/archive/refs/tags/v${DANMAKU_FACTORY_VERSION}.tar.gz -O DanmakuFactory.tar.gz && \
tar -xzf DanmakuFactory.tar.gz --strip 1 && \
make && \
cp DanmakuFactory /DanmakuFactory
FROM python:slim as recorder
RUN apt-get update && \
apt-get install -y --no-install-recommends wget && \
wget https://dot.net/v1/dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -c 6.0 --runtime aspnetcore --install-dir /usr/local/bin && \
apt-get purge -y --autoremove wget && \
rm -rf dotnet-install.sh \
/var/lib/apt/lists/* \
/tmp/*
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone
WORKDIR /recorder
COPY --from=bililive/recorder:2.12.0 /app .
EXPOSE 2356
FROM recorder as webhook
COPY --from=aliyunpan-build /aliyunpan /usr/local/bin/
COPY --from=baidupcs-build /baidupcs /usr/local/bin/
COPY --from=danmaku-factory-build /DanmakuFactory /usr/local/bin/
COPY --from=puzzlemoondev/biliup-rs /biliup /usr/local/bin/
COPY --from=puzzlemoondev/ffmpeg-static /ffmpeg /usr/local/bin/
RUN apt-get update && \
apt-get install -y --no-install-recommends \
webhook \
redis-server \
fonts-noto \
fonts-noto-cjk \
fonts-noto-color-emoji && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/supervisord /var/redis
WORKDIR /webhook
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY webhook webhook
COPY hooks.json /etc/
COPY supervisord.conf /etc/
EXPOSE 5555 9001
CMD ["supervisord", "-c", "/etc/supervisord.conf"]