I have created a basic asp.net core MVC project with this command:

```
dotnet new mvc --name "myproject"

```

I have created this very basic Dockerfile which builds a runtime image:

```
FROM  mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
COPY . .
RUN dotnet restore "./myproject.csproj"
RUN dotnet build "myproject.csproj" -c Release -o /app
RUN dotnet publish "myproject.csproj" -c Release -o /app

FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "myproject.dll"]

```

I have setup a github account and a docker hub account in order to build the image on each commit/push.

The building takes about 6 minutes. This is very slow. I am wondering the result on a real bigger project.

What can i do in order to speed-up this compilation ?

My goal is to put on production the image (CI pipeline). If i fix a bug, i can't wait 10 minutes. This is paradoxal because i used to work with an old school method: ftp transfert of binary files and it takes ... 30 seconds !
I am wrong somewhere in this goal ?

Thanks