Skip to content

Commit

Permalink
Adding Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoApp committed Dec 9, 2024
1 parent 81aab4c commit f300b8d
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit f300b8d

Please sign in to comment.