Skip to content

Commit

Permalink
Fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
totollygeek committed Apr 8, 2024
1 parent 8b36edb commit bb43484
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/awesome.app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
USER $APP_UID
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["src/awesome-app/awesome-app.csproj", "awesome-app/"]
RUN dotnet restore "src/awesome-app/awesome-app.csproj"

COPY . .
WORKDIR "/src/awesome-app"
RUN dotnet build "awesome-app.csproj" -c Release -o /app/build

RUN dotnet restore "awesome-app.sln"
RUN dotnet build "awesome-app.sln"

FROM build AS publish
RUN dotnet publish "awesome-app.csproj" -c Release -o /app/publish
WORKDIR "/src/src/awesome.app"

RUN dotnet publish "awesome.app.csproj" -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "awesome-app.dll"]
ENTRYPOINT ["dotnet", "awesome.app.dll"]

0 comments on commit bb43484

Please sign in to comment.