awesome-compose/nginx-aspnet-mysql/backend/Dockerfile
Esteban Solano Granados bc95525543
Upgrade nginx-aspnet-mysql to net6.0 🚀 (#198)
* Upgrade to net6.0 [csproj]
* Upgrade MySqlConnector NuGet package
* Port Program to net6.0
* Upgrade Dockerfile base image
2022-03-21 18:43:05 +01:00

17 lines
398 B
Docker
Executable File

FROM mcr.microsoft.com/dotnet/aspnet:6.0 as base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
COPY . /src
WORKDIR /src
RUN ls
RUN dotnet build "aspnetapp.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "aspnetapp.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "aspnetapp.dll"]