-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.net9
More file actions
39 lines (29 loc) · 1.22 KB
/
Dockerfile.net9
File metadata and controls
39 lines (29 loc) · 1.22 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
36
37
38
39
FROM debian:12 AS base
WORKDIR /app
# This stage is used to build the service project
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["iOS.audio.conversion.test.net9.csproj", "."]
RUN dotnet restore "./iOS.audio.conversion.test.net9.csproj"
COPY . .
WORKDIR "/src"
RUN dotnet build "./iOS.audio.conversion.test.net9.csproj" -c $BUILD_CONFIGURATION -o /app/build
# This stage is used to publish the service project to be copied to the final stage
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./iOS.audio.conversion.test.net9.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
# This stage is used in production or when running from VS in regular mode (Default when not using the Debug configuration)
FROM base AS final
RUN apt update -y
RUN apt upgrade -y
RUN apt install wget -y
RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN apt update -y
RUN apt install ffmpeg -y
RUN apt install dotnet-runtime-9.0 -y
WORKDIR /app
COPY --from=publish /app/publish .
COPY BAD.mp4 .
ENTRYPOINT ["dotnet", "iOS.audio.conversion.test.net9.dll"]