forked from mo10/TS3NeteaseCloudMusicBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (24 loc) · 1.02 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (24 loc) · 1.02 KB
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
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y unzip && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /app && \
wget https://github.com/Splamy/TS3AudioBot/releases/download/0.12.0/TS3AudioBot_dotnetcore3.1.zip -o /tmp/ts3audiobot.zip && \
unzip /tmp/ts3audiobot.zip -d /app/TS3AudioBot_dotnetcore3.1 && \
rm -rf /tmp/ts3audiobot.zip
WORKDIR /app/ts3ncm
COPY . /app/ts3ncm
RUN dotnet restore && \
dotnet build -c Release -f netcoreapp3.1 -o out
FROM mcr.microsoft.com/dotnet/runtime:3.1 AS runtime
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y libopus-dev ffmpeg && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN mkdir -p /app/plugins
COPY --from=build /app/TS3AudioBot_dotnetcore3.1 /app
COPY --from=build /app/ts3ncm/out/ts3ncm.dll /app/plugins
EXPOSE 58913
ENTRYPOINT ["dotnet", "TS3AudioBot.dll"]