From e74c9c783462206c2e61d2433d230aa067288b91 Mon Sep 17 00:00:00 2001 From: WilcoApp Date: Mon, 9 Dec 2024 12:07:30 +0000 Subject: [PATCH] Adding Dockerfile --- webhook/Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 webhook/Dockerfile diff --git a/webhook/Dockerfile b/webhook/Dockerfile new file mode 100644 index 0000000..39c1d7f --- /dev/null +++ b/webhook/Dockerfile @@ -0,0 +1,17 @@ +# Use the official .NET Core SDK image to build the app +FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build +WORKDIR /app + +# Copy the csproj and restore as distinct layers +COPY *.csproj ./ +RUN dotnet restore + +# Copy the remaining files and build the app +COPY . ./ +RUN dotnet publish -c Release -o out + +# Use the official ASP.NET Core runtime image to run the app +FROM mcr.microsoft.com/dotnet/aspnet:3.1 +WORKDIR /app +COPY --from=build /app/out . +ENTRYPOINT ["dotnet", "webhook.dll"] \ No newline at end of file