Last active 1 week ago

Revision 80449cc96b55802a60fe3b93398892da8c34f408

Dockerfile Raw
1#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
2
3FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
4WORKDIR /app
5EXPOSE 5000
6
7FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:9.0 AS build
8ARG TARGETARCH
9ARG BUILD_CONFIGURATION=Release
10WORKDIR /src
11COPY ["WeddingShare/WeddingShare.csproj", "WeddingShare/"]
12RUN dotnet restore -a $TARGETARCH "./WeddingShare/./WeddingShare.csproj"
13COPY . .
14WORKDIR "/src/WeddingShare"
15RUN dotnet build "./WeddingShare.csproj" -a $TARGETARCH -c $BUILD_CONFIGURATION -o /app/build
16
17FROM build AS publish
18ARG BUILD_CONFIGURATION=Release
19RUN dotnet publish "./WeddingShare.csproj" -a $TARGETARCH -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
20
21FROM debian:12 as ffmpeg
22RUN apt update
23RUN apt install -y wget unzip
24WORKDIR /ffmpeg
25# Replace these links with the arm ones from the link above
26RUN wget https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v6.1/ffmpeg-6.1-linux-arm-64.zip
27RUN wget https://github.com/ffbinaries/ffbinaries-prebuilt/releases/download/v6.1/ffprobe-6.1-linux-arm-64.zip
28RUN unzip ffmpeg-6.1-linux-arm-64.zip
29RUN unzip ffprobe-6.1-linux-arm-64.zip
30
31FROM base AS final
32WORKDIR /ffmpeg
33COPY --from=ffmpeg /ffmpeg/ffmpeg .
34COPY --from=ffmpeg /ffmpeg/ffprobe .
35COPY --from=ffmpeg /ffmpeg/ffmpeg /usr/local/bin/ffmpeg
36COPY --from=ffmpeg /ffmpeg/ffprobe /usr/local/bin/ffprobe
37WORKDIR /app
38COPY --from=publish /app/publish .
39ENTRYPOINT ["dotnet", "WeddingShare.dll"]
40