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