Forum Discussion
[server 20303] Issues running containers
- Mar 25, 2021
docker run hello-world --isolation-hypervshould be
docker run --isolation=hyperv hello-worldThings after the container name are taken as parameters to the container execution, and so docker isn't seeing the "--isolation-hyperv" parameter when you add it, or it would have told you that it was an unknown parameter, as it needs to be "--isolation=hyperv" or "--isolation hyperv".
The hello-world container will need to run with Hyper-V isolation for you, because https://github.com/docker-library/hello-world/blob/master/amd64/hello-world/nanoserver-1809/Dockerfile, i.e. Windows Server LTSC 2019. If you're following a guide for Windows 10, note that on Windows 10, Hyper-V isolation is the default for Docker, so they won't use --isolation=hyperv in examples like this.
To use process isolation, you'll need to use an insider container image base matching the installed build, e.g. https://hub.docker.com/_/microsoft-windows-nanoserver-insider . Sadly, I don't think many (or any) image sources in the wild produce builds based on the insider versions, so if you're not building your own containers, you'll need to use Hyper-V isolation until this version of Windows Server is shipped, and container builders add it to their CI pipelines.
So with the latest build of Server 2022, I simply can not run any container either natively or via isolation.
I have a set of scripts at: https://github.com/doctordns/PACKT-PS7/tree/master/scripts/Ch%2012%20-%20Containers
ALL of them fail to run the container.
Each of these scripts worked with Server 2019 - and am happy to retest that if needed.