I am exploring the possibility of launching the C # Kinect visual gesture program (something like the “Continuous Building Basics” project https://github.com/angelaHillier/ContinuousGestureBasics-WPF) inside the Docker for the Windows container.
Is this possible theoretically (run C # Kinect in a Docker container for Windows?)
If the answer is 1 - yes, here are some additional details:
I am using microsoft / dotnet-framework: 4.7 image as the base, and my initial Docker file looks like this:
FROM microsoft/dotnet-framework:4.7 ADD . /home/gesture WORKDIR /home/gesture
Create an image:
$ docker build -t kinect .
Include container:
$ docker run -dit --name kinectContainer kinect
Attach a powershell session to the monkey around:
$ docker exec -it kinectContainer powershell
When I try to start the gesture application from the Docker container, I get the following error (which is expected since the Kinect SDK is not installed in the container):
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'Microsoft.Kinect, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependenc ies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)
At this point, the big question arises: how to install the Kinect v2 SDK [KinectSDK-v2.0_1409-Setup.exe] or Kinect v2 runtime [KinectRuntime-v2.0_1409-Setup.exe] in the container.
Installers have a license agreement and, according to some smart University of Wisconsin , there is a way to extract installers using the Wix dark.exe decompiler ( https://social.msdn.microsoft.com/Forums/en-US/a5b04520-e437-48e3- ba22-e2cdb46b4d62 / silent-install-installation-instructions? forum = kinectsdk )
ex.
$ & 'C:\Program Files (x86)\WiX Toolset v3.11\bin\dark.exe' C:\installerwork\KinectRuntime-v2.0_1409-Setup.exe -xc:\installerwork\kinect_sdk_installersfiles
The problem that I encountered when I got into the main msi files, there is no way to run them without using msiexec.
I found out that the runtime installer (Runtime installer (KinectRuntime-x64.msi), extracted from the Kinect v2 SDK) makes at least the following changes to the file system:
Creates a Kinect folder in C: \ Windows \ System32 and adds 3 files to System 32:
k4wcll.dll
kinect20.dll
microsoft._kinect.dll
The last three files in System32 must be 64-bit versions (the installer has the x86 and x64 versions of the 3)
Manually replicating these changes does not succeed on the host, not to mention the container.
It is currently unclear what other registry / system changes are occurring with the installer (and whether this will take us along the line of the target in the Docker container)
Any ideas on how to get here?