Created a simple .net core app. Trying to run docker build
but I'm getting:
"no matching manifest for windows/amd64 10.0.14393 in the manifest list entries"
Docker File:
FROM microsoft/dotnet:sdk AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM microsoft/dotnet:aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "HelloWorld.dll"]
Take 2: Tried vs2019, created new MVC app => add docker support (windows) Dockerfile:
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-nanoserver-1809 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-nanoserver-1809 AS build
WORKDIR /src
COPY ["coremvc.csproj", ""]
RUN dotnet restore "./coremvc.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "coremvc.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "coremvc.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "coremvc.dll"]
Now getting:
a Windows version 10.0.17763-based image is incompatible with a 10.0.14393 host
Docker that's installed on the Server:
Name Version ---- ------- Docker 19.03.2
Why can't I run these on Windows Server 2016?. It worked fine on Windows 10 locally