title: Failed to build: manifest for Microsoft/aspnetcore:2.1 not found Visual Studio 7.5.2 Mac OS X
body: <p>I have created an Asp.net 2.1 Web API project using Visual Studio 7.5.2 in Mac OS X. I added a docker support to the project but while building, the project keep getting an error that states: <code>failed to build: manifest for microsoft/aspnetcore:2.1 not found.</code>.</p>
  
  <p><strong>Docker file for project</strong> </p>
  
  <pre><code>FROM microsoft/aspnetcore:2.1 AS base
  WORKDIR /app
  EXPOSE 80
  
  FROM microsoft/aspnetcore-build:2.1 AS build
  WORKDIR /src
  COPY MeroRentalDev.sln ./
  COPY Auth.API/Auth.API.csproj Auth.API/
  RUN dotnet restore -nowarn:msb3202,nu1503
  COPY . .
  WORKDIR /src/Auth.API
  RUN dotnet build -c Release -o /app
  
  FROM build AS publish
  RUN dotnet publish -c Release -o /app
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app .
  ENTRYPOINT ["dotnet", "Auth.API.dll"]
  </code></pre>
  
  <p><strong>dockerfile.yml</strong></p>
  
  <pre><code>version: '3.4'
  
      services:
        auth.api:
          image: auth
          build:
            context: .
            dockerfile: Auth.API/Dockerfile
  </code></pre>
  
  <p>Full error details</p>
  
  <pre><code>Building: docker-compose (Debug)
  Build started 8/06/2018 3:05:13 PM.
  __________________________________________________
  Project "/Users/macbook/Projects/MeroRentalDev/docker-compose.dcproj" (Build target(s)):
  
  Target DockerResolveAppType:
      __________________________________________________
      Project "/Users/macbook/Projects/MeroRentalDev/docker-compose.dcproj" is building "/Users/macbook/Projects/MeroRentalDev/Auth.API/Auth.API.csproj" (DockerResolveAppType target(s)):
  
  Target DockerResolveTargetFramework:
      __________________________________________________
      Project "/Users/macbook/Projects/MeroRentalDev/docker-compose.dcproj" is building "/Users/macbook/Projects/MeroRentalDev/Auth.API/Auth.API.csproj" (DockerResolveTargetFramework target(s)):
  
  Target DockerResolveProjectInputAndOutput:
      __________________________________________________
      Project "/Users/macbook/Projects/MeroRentalDev/docker-compose.dcproj" is building "/Users/macbook/Projects/MeroRentalDev/Auth.API/Auth.API.csproj" (DockerResolveProjectInputAndOutput target(s)):
  
  Target DockerPrepareForBuild:
      docker ps --filter "status=running" --filter "name=dockercompose763682937431840732_auth.api_" --format {{.ID}} -n 1
  Target DockerBuildServiceReferences:
      __________________________________________________
      Project "/Users/macbook/Projects/MeroRentalDev/docker-compose.dcproj" is building "/Users/macbook/Projects/MeroRentalDev/Auth.API/Auth.API.csproj" (Build target(s)):
  
      Target _HandlePackageFileConflicts:
          Encountered conflict between 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Collections.Immutable.dll' and 'Reference:/Users/macbook/.nuget/packages/system.collections.immutable/1.5.0/lib/netstandard2.0/System.Collections.Immutable.dll'.  Choosing 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Collections.Immutable.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Diagnostics.DiagnosticSource.dll' and 'Reference:/Users/macbook/.nuget/packages/system.diagnostics.diagnosticsource/4.5.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll'.  Choosing 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Diagnostics.DiagnosticSource.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Reflection.Metadata.dll' and 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.reflection.metadata/1.6.0/lib/netstandard2.0/System.Reflection.Metadata.dll'.  Choosing 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Reflection.Metadata.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Runtime.Serialization.Xml.dll' and 'Reference:/Users/macbook/.nuget/packages/system.runtime.serialization.xml/4.3.0/ref/netstandard1.3/System.Runtime.Serialization.Xml.dll'.  Choosing 'Reference:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.netcore.app/2.1.0/ref/netcoreapp2.1/System.Runtime.Serialization.Xml.dll' because AssemblyVersion '4.1.4.0' is greater than '4.1.1.0'.
          Encountered conflict between 'Platform:Microsoft.Win32.Registry.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.win32.registry/4.5.0/lib/netstandard2.0/Microsoft.Win32.Registry.dll'.  Choosing 'Platform:Microsoft.Win32.Registry.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Collections.Immutable.dll' and 'Runtime:/Users/macbook/.nuget/packages/system.collections.immutable/1.5.0/lib/netstandard2.0/System.Collections.Immutable.dll'.  Choosing 'Platform:System.Collections.Immutable.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Diagnostics.DiagnosticSource.dll' and 'Runtime:/Users/macbook/.nuget/packages/system.diagnostics.diagnosticsource/4.5.0/lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll'.  Choosing 'Platform:System.Diagnostics.DiagnosticSource.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Reflection.Metadata.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.reflection.metadata/1.6.0/lib/netstandard2.0/System.Reflection.Metadata.dll'.  Choosing 'Platform:System.Reflection.Metadata.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Runtime.Serialization.Xml.dll' and 'Runtime:/Users/macbook/.nuget/packages/system.runtime.serialization.xml/4.3.0/lib/netstandard1.3/System.Runtime.Serialization.Xml.dll'.  Choosing 'Platform:System.Runtime.Serialization.Xml.dll' because AssemblyVersion '4.1.4.0' is greater than '4.1.2.0'.
          Encountered conflict between 'Platform:System.Security.AccessControl.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.accesscontrol/4.5.0/lib/netstandard2.0/System.Security.AccessControl.dll'.  Choosing 'Platform:System.Security.AccessControl.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Security.Cryptography.Cng.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.cryptography.cng/4.5.0/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll'.  Choosing 'Platform:System.Security.Cryptography.Cng.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Security.Principal.Windows.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.principal.windows/4.5.0/lib/netstandard2.0/System.Security.Principal.Windows.dll'.  Choosing 'Platform:System.Security.Principal.Windows.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:Microsoft.Win32.Registry.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.win32.registry/4.5.0/runtimes/unix/lib/netstandard2.0/Microsoft.Win32.Registry.dll'.  Choosing 'Platform:Microsoft.Win32.Registry.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:Microsoft.Win32.Registry.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/microsoft.win32.registry/4.5.0/runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll'.  Choosing 'Platform:Microsoft.Win32.Registry.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Security.AccessControl.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.accesscontrol/4.5.0/runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll'.  Choosing 'Platform:System.Security.AccessControl.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Security.Cryptography.Cng.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.cryptography.cng/4.5.0/runtimes/win/lib/netcoreapp2.1/System.Security.Cryptography.Cng.dll'.  Choosing 'Platform:System.Security.Cryptography.Cng.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Security.Principal.Windows.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.principal.windows/4.5.0/runtimes/unix/lib/netcoreapp2.0/System.Security.Principal.Windows.dll'.  Choosing 'Platform:System.Security.Principal.Windows.dll' because it comes from a package that is preferred.
          Encountered conflict between 'Platform:System.Security.Principal.Windows.dll' and 'Runtime:/usr/local/share/dotnet/sdk/NuGetFallbackFolder/system.security.principal.windows/4.5.0/runtimes/win/lib/netcoreapp2.0/System.Security.Principal.Windows.dll'.  Choosing 'Platform:System.Security.Principal.Windows.dll' because it comes from a package that is preferred.
      Target GenerateTargetFrameworkMonikerAttribute:
        Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
      Target _CoreGenerateRazorAssemblyInfo:
        Skipping target "_CoreGenerateRazorAssemblyInfo" because all output files are up-to-date with respect to the input files.
      Target CoreGenerateAssemblyInfo:
        Skipping target "CoreGenerateAssemblyInfo" because all output files are up-to-date with respect to the input files.
      Target CoreCompile:
        Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
      Target GenerateBuildDependencyFile:
        Skipping target "GenerateBuildDependencyFile" because all output files are up-to-date with respect to the input files.
      Target GenerateBuildRuntimeConfigurationFiles:
        Skipping target "GenerateBuildRuntimeConfigurationFiles" because all output files are up-to-date with respect to the input files.
      Target CopyFilesToOutputDirectory:
          Auth.API -&gt; /Users/macbook/Projects/MeroRentalDev/Auth.API/bin/Debug/netcoreapp2.1/Auth.API.dll
  Target DockerUpdateComposeVsGeneratedFiles:
      __________________________________________________
      Project "/Users/macbook/Projects/MeroRentalDev/docker-compose.dcproj" is building "/Users/macbook/Projects/MeroRentalDev/Auth.API/Auth.API.csproj" (DockerUpdateComposeVsGeneratedFiles target(s)):
  
      Copying file from "/Users/macbook/Projects/MeroRentalDev/obj/Docker/docker-compose.vs.debug.partial.g.yml" to "/Users/macbook/Projects/MeroRentalDev/obj/Docker/docker-compose.vs.debug.g.yml".
      Copying file from "/Users/macbook/Projects/MeroRentalDev/obj/Docker/docker-compose.vs.release.partial.g.yml" to "/Users/macbook/Projects/MeroRentalDev/obj/Docker/docker-compose.vs.release.g.yml".
  Target DockerPrepareForLaunch:
      docker-compose  -f "/Users/macbook/Projects/MeroRentalDev/docker-compose.yml" -f "/Users/macbook/Projects/MeroRentalDev/docker-compose.override.yml" -f "/Users/macbook/Projects/MeroRentalDev/obj/Docker/docker-compose.vs.debug.g.yml" -p dockercompose763682937431840732 --no-ansi up -d --build --force-recreate --remove-orphans
      Building auth.api
      Step 1/3 : FROM microsoft/aspnetcore:2.1 AS base
      Service 'auth.api' failed to build: manifest for microsoft/aspnetcore:2.1 not found
      /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : Building auth.api
      /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : Service 'auth.api' failed to build: manifest for microsoft/aspnetcore:2.1 not found.
      /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : 
      /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting
  Done building target "DockerPrepareForLaunch" in project "docker-compose.dcproj" -- FAILED.
  
  Done building project "docker-compose.dcproj" -- FAILED.
  
  Build FAILED.
  
  /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : Building auth.api
  /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : Service 'auth.api' failed to build: manifest for microsoft/aspnetcore:2.1 not found.
  /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : 
  /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/docker/MonoDevelop.Docker/MSbuild/Sdks/Microsoft.Docker.Sdk/build/Microsoft.VisualStudio.Docker.Compose.targets(363,5): error : For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting
      0 Warning(s)
      1 Error(s)
  
  Time Elapsed 00:00:07.03
  
  ---------------------- Done ----------------------
  
  Build: 1 error, 0 warnings
  </code></pre>
  
  <p>I tried some solution from these links:</p>
  
  <p><a href="https://stackoverflow.com/questions/49798012/aspnetcore2-1-not-found">AspNetCore:2.1 not found</a></p>
  
  <p><a href="https://stackoverflow.com/questions/49795793/cannot-run-dot-net-core-preview-project-on-docker">Cannot run Dot net core preview project on Docker</a></p>
  
  <p>I updated the docker image to the latest version using the below command but still had the same issues.</p>
  
  <pre><code>Pulling from microsoft/dotnet
  
  Pulling from microsoft/aspnetcore-build
  </code></pre>