butleger
butleger

Reputation: 13

change default docker isolation on windows

Need set default isolation to hyper-v isolation for docker daemon, but cant find information about it. I use docker without docker desktop and wsl, just windows containers.

I tried find info about this on google, but not find where this should be configured. May be i miss this info in docker documentation or windows container documentation

Upvotes: 0

Views: 361

Answers (1)

Colin Finck
Colin Finck

Reputation: 1

The current default container isolation mode is Hyper-V on Windows clients and Process Isolation on Windows servers. I didn't find a more official way of changing this default other than editing the Docker daemon JSON configuration file and adding a line

  "exec-opts": ["isolation=process"],

to switch Windows clients to use Process Isolation by default, or alternatively

  "exec-opts": ["isolation=hyperv"],

to switch Windows servers to use Hyper-V Isolation by default.

The Docker daemon JSON configuration file can be edited in Docker Desktop via Settings -> Docker Engine. It's also possible to edit this file by hand. A system-wide Docker daemon JSON configuration file is stored in C:\ProgramData\Docker\config and user-specific ones are in %USERPROFILE%\.docker.

Upvotes: 0

Related Questions