I have asp.net core project developed in my machine with docker support. The docker file resides in my project.
i.e, its placed outside the modules and under the rootfolder.
This image is working perfectly fine when I run using Visual studio.
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base WORKDIR /app EXPOSE 80 EXPOSE 443 FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build WORKDIR /src COPY ["WebApplication4.csproj", ""] RUN dotnet restore "./WebApplication4.csproj" COPY . . WORKDIR "/src/." RUN dotnet build "WebApplication4.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "WebApplication4.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "WebApplication4.dll"]
I have created a pipeline in Azure Devops. and pushed the same code the way it is in my system, to azure git repository. but it fails to at workdir itself.
What is that I am missing here?
Source: Docker Questions