lnstructions for Nano server containers
On Windows Server Nano, CSDK operates at KernelAPI level. Application can use the Engine with invoking Engine.Init("YourCompany", "YourProduct", false), to initialize the Engine only KernelAPI functionality.
-
Install Docker on machine that has Hyper-V enabled.
-
On Windows 10 and 11 – download and install Docker CE.
-
On Windows Server – run the following commands in elevated PowerShell.
Install-Module DockerMsftProvider -Force Install-Package Docker -ProviderName DockerMsftProvider -Force
-
- Restart the PC.
- Verify that Docker is in Windows mode – run command docker info to make sure that OSType: Windows
- Verify that Docker is working properly by running command docker run hello-world:nanoserver
- Download base images: docker pull mcr.microsoft.com/dotnet/core/runtime:3.1
-
Prepare a folder from where you will create an image. It should contain Program
folder, which contains:
-
Files exported by 64-bit Distribution Wizard (having selected all items but all Visuals, all Scanner, all IPRO and IWR)
-
Your .Net Core application as dll and input files for it
-
Licensing.config file, pointing to OPLA licensing server
-
Dockerfile:
# escape=` FROM mcr.microsoft.com/dotnet/core/runtime:3.1 RUN md c:\Program COPY Program c:\Program COPY CrtForNano_CSDK c:\Program WORKDIR Program # CMD dotnet YourProgramName.dll
-
Windows CRT package in C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.29.30133\onecore\x64\Microsoft.VC142.CRT
List of CRT files needed for Windows Server Nano:
-
concrt140.dll
-
msvcp140.dll
-
msvcp140_1.dll
-
msvcp140_2.dll
-
ucrtbase.dll
-
vccorlib140.dll
-
vcomp140.dll
-
vcruntime140.dll
-
-
- Open PowerShell, create a new image by navigating to your folder and running this command (with dot): Docker build -t ImageName .
- After image is created – run it by issuing command: Docker run -it ImageName