5
2
I try to install the Windows feature "NetworkController
" on a docker container on Windows 2016 Server TP4, using Powershell.
After I run "Add-WindowsFeature NetworkController
", I get the message:
"You must restart this server to finish the installation process."
When I now check again (without having done anything else yet) with Get-WindowsFeature, it has the install state "InstallPending".
Now I am not sure what "restart this server" means 100%, but I suppose it means I am supposed to restart the host machine, since there is nothing else to restart (and the container itself is just a container, not a VM as with a Hyper-V approach).
So I try the following aproaches:
Approach (1)
I stop the docker container using docker stop iisdemo
, then restart the host machine (my Windows 2016 server) and then restart the docker container, using docker start iisdemo
.
But when I check for the NetworkController, it's still not installed.
Approach (2)
In a second attempt, I add the feature, then restart the docker container without restarting the Windows 2016 server, just running
dock restart iisdemo
.
Now something strange happens, when I try to check for the features via Get-WindowsFeature *network*
, the process of collecting data stops at 57% and the container exists by itself.
When I attach to the docker image again:
> docker start iisdemo
> docker attach iisdemo
> powershell
> Get-WindowsFeature *network*
I am back to where I started:
Approach (3)
Another third approach obviously should not work, but I tried it anyway and restarted the Windows 2016 server/host without stopping the docker container at all. Needless to say, this did not work either (same behaviour as approach 1, the container exits at 57% of collecting data).
Approach (4)
Running a "shutdown -r -f -t 10
" inside the container does not help either. After the restart, the NetworkController
is still not installed.
Note: I tried to use both Docker containers as well as Windows containers (created and managed via Powershell commands), makes no difference.