Reputation:
I have C++ application and it is running via ASP.NET Core application. The C++ application is x86 based, so it is not running in aspnetcore:2.0-nanoserver images.
I read about nanoserver containers and it supports x64 based application. I am unable to build my C++ application as it has dependencies with x86 libraries.
So I use windowsservercore images, which supports both x86 and x64 applications. Tested my C++ application in container commandline and it is working fine.
But this image does not have dotnetcore installed, so please let me know how to install dotnetcore in windowsservercore container. Suggest me windowsservercore image with dotnetcore.
Upvotes: 5
Views: 3593
Reputation: 12360
If you have Docker installed and working on your desktop, then it is not hard to create your own docker image that will install dotnetcore onto a windows server image. Something very like this should serve your purpose:
FROM microsoft/iis:windowsservercore
COPY dotnet-runtime-2.0.4-win-x64.exe C:\
RUN C:\dotnet-runtime-2.0.4-win-x64.exe /quiet /install
Interpret this dockerfile as
dotnet-runtime-2.0.4-win-x64.exe
into the imageIn order to make this work you should
Dockerfile
in this working directorydotnet-runtime-2.0.4-win-x64.exe
into the same working directory from https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.4-download.mdOn the commandline, CD to the directory and run the docker build command:
docker build -t MyDotNetOnServerCoreContainer -f Dockerfile
It's worth an hour of your time to go through the tutorial on making Dockerfiles.
Upvotes: 7