I am having some speed issues with my docker-compose build on both docker for windows and on my Azure Devops Build pipeline, i am hoping that we have a few asp.net core and docker aficionados around here. Below are a few samples as i am pretty new to docker and have ended up building an entire application architecture around it now.
So my build times are about 22 mins (seems a bit excessive to me)
docker-compose snippet (there are of course many more services than this)
Dockerfile example (each service has its own docker-file
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
FROM microsoft/dotnet:2.1-sdk as dotnet-build
FROM dotnet-build as build
COPY . .
RUN dotnet restore -nowarn:msb3202,nu1503
RUN dotnet build --no-restore -c Release -o /app
FROM build AS publish
RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
COPY --from=publish /app .
ENTRYPOINT [“dotnet”, “Identity.API.dll”]
if anyone can see me doing anything bizarre that would increase build times please point it out i would be very grateful to figure out what i am doing wrong!
happy to share screenshots of my azure devops build definitions if that helps