diff --git a/action.yml b/action.yml index c9099e77..4a441574 100644 --- a/action.yml +++ b/action.yml @@ -117,6 +117,11 @@ inputs: 'Amount of memory to assign the docker container. Defaults to 95% of total system memory rounded down to the nearest megabyte on Linux and 80% on Windows. On unrecognized platforms, defaults to 75% of total system memory. To manually specify a value, use the format , where unit is either m or g. ie: 512m = 512 megabytes' + dockerIsolationMode: + required: false + default: 'process' + description: + 'Isolation mode to use for the docker container. Can be either process or hyperv. Only applicable on Windows' allowDirtyBuild: required: false default: '' diff --git a/dist/index.js b/dist/index.js index b5efe37e..9733b1f0 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 5d4b1726..63f67b4e 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/src/model/docker.ts b/src/model/docker.ts index ee21c753..aec955bc 100644 --- a/src/model/docker.ts +++ b/src/model/docker.ts @@ -98,6 +98,7 @@ class Docker { dockerWorkspacePath, dockerCpuLimit, dockerMemoryLimit, + dockerIsolationMode, } = parameters; return `docker run \ @@ -118,6 +119,7 @@ class Docker { --volume "${actionFolder}/BlankProject":"c:/BlankProject" \ --cpus=${dockerCpuLimit} \ --memory=${dockerMemoryLimit} \ + --isolation=${dockerIsolationMode} \ ${image} \ powershell c:/steps/entrypoint.ps1`; } diff --git a/src/model/input.ts b/src/model/input.ts index 43667e18..8e228c25 100644 --- a/src/model/input.ts +++ b/src/model/input.ts @@ -252,6 +252,10 @@ class Input { ); } + static get dockerIsolationMode(): string { + return Input.getInput('dockerIsolationMode') || 'process'; + } + public static ToEnvVarFormat(input: string) { if (input.toUpperCase() === input) { return input;