File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Keep your original structure but optimize base image
2- FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS lib-build
2+ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS lib-build
33
44WORKDIR /deps
55
6- RUN apk add -- no-cache \
6+ RUN apt update && apt install -y -- no-install-recommends \
77 nodejs \
88 npm \
99 ffmpeg \
1010 libsodium-dev \
11- opus -dev \
11+ libopus -dev \
1212 yt-dlp \
1313 wget \
14+ unzip \
1415 tzdata && \
16+ rm -rf /var/lib/apt/lists/* && \
1517 ln -sf /usr/share/zoneinfo/Asia/Singapore /etc/localtime
1618
1719RUN wget -O /tmp/libdave.zip \
@@ -50,14 +52,15 @@ RUN dotnet publish "$PROJECT_PATH" \
5052 --self-contained false \
5153 --no-restore
5254
53- FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS final
55+ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS final
5456
55- RUN apk add -- no-cache \
57+ RUN apt update && apt install -y -- no-install-recommends \
5658 ffmpeg \
5759 tzdata \
5860 yt-dlp && \
61+ rm -rf /var/lib/apt/lists/* && \
5962 ln -sf /usr/share/zoneinfo/Asia/Singapore /etc/localtime
60-
63+
6164WORKDIR /app/run
6265
6366ENV ASPNETCORE_ENVIRONMENT=Production
Original file line number Diff line number Diff line change 3232 </ItemGroup >
3333 <Target Name =" CopyLibsAfterBuild" AfterTargets =" Build" Condition =" '$(OS)' == 'Unix'" >
3434 <Message Text =" Copying native libraries..." Importance =" high" />
35- <Copy SourceFiles =" /usr/lib/libsodium.so"
35+ <Copy SourceFiles =" /usr/lib/x86_64-linux-gnu/ libsodium.so"
3636 DestinationFolder =" $(OutputPath)" />
37- <Copy SourceFiles =" /usr/lib/libopus.so"
37+ <Copy SourceFiles =" /usr/lib/x86_64-linux-gnu/ libopus.so"
3838 DestinationFolder =" $(OutputPath)" />
3939 <Copy SourceFiles =" /usr/bin/yt-dlp"
4040 DestinationFolder =" $(OutputPath)" />
4545 </PropertyGroup >
4646
4747 <ItemGroup Condition =" '$(IsUnix)' == 'true'" >
48- <NativeLibs Include =" /usr/lib/libsodium.so" />
49- <NativeLibs Include =" /usr/lib/libopus.so" />
48+ <NativeLibs Include =" /usr/lib/x86_64-linux-gnu/ libsodium.so" />
49+ <NativeLibs Include =" /usr/lib/x86_64-linux-gnu/ libopus.so" />
5050 <NativeLibs Include =" /usr/lib/libdave.so" />
5151 <NativeLibs Include =" /usr/bin/yt-dlp" />
5252 </ItemGroup >
You can’t perform that action at this time.
0 commit comments