guestbooky/build/guestbooky-be/Dockerfile

19 lines
490 B
Docker
Raw Permalink Normal View History

2024-10-05 00:27:04 +02:00
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app
COPY ../../src/Guestbooky/ .
COPY ../../tests/ .
RUN dotnet restore ./Guestbooky.API/
RUN dotnet build ./Guestbooky.API/Guestbooky.API.csproj -c Release -o /app/build
RUN dotnet publish ./Guestbooky.API/Guestbooky.API.csproj -c Release -o /app/publish
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
EXPOSE 5008
ENTRYPOINT ["dotnet", "Guestbooky.API.dll"]