Skip to content

Commit

Permalink
feat: add Dockerfile for building and running app
Browse files Browse the repository at this point in the history
  • Loading branch information
raffreitas committed Dec 30, 2024
1 parent b3c8758 commit 007c5a7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
WORKDIR /app

COPY src/ .

WORKDIR /MyRecipes.API/

RUN dotnet restore
RUN dotnet publish -c Relase -o /app/out

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /app

COPY --from=build-env/out /app/out .

ENTRYPOINT [ "dotnet", "MyRecipes.API.dll" ]

0 comments on commit 007c5a7

Please sign in to comment.