List container tools (Containerd, BuildKit, nerdctl) and shows if the tool is installed, the installed version and the latest available version.
Parameters
None
Output
Name | Type | Description |
---|---|---|
Tool | String | Name of the container tool. Either Containerd, BuildKit, or nerdctl. |
Installed | Boolean | Specifies whether the tool is installed or not. |
Version | String | Installed version. |
LatestVersion | String | Latest available version |
Downloads container tool (Containerd, BuildKit, nerdctl) asynchronously and installs them at the specified location
Parameters
Name | Type | Description | Default |
---|---|---|---|
ContainerdVersion | String | Containerd version to install | Latest version |
BuildKitVersion | String | BuildKit version to install | Latest version |
nerdctlVersion | String | nerdctl version to install | Latest version |
InstallPath | String | Path to install container tools | $Env:ProgramFiles |
DownloadPath | String | Path to download container tools | $HOME\Downloads |
Cleanup | Switch | Specifies whether to cleanup after installation is done | |
Force | Switch | Force install the tools even if they already exists at the specified path | |
RegisterServices | Switch | Register and Start Conatinerd and Buildkitd services and set up NAT network | |
Confirm | Switch | Prompts for confirmation before running the cmdlet. For more information, see the following articles: about_Preference_Variables and about_Functions_CmdletBindingAttribute | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Returns the latest Containerd version number.
Parameters
None
Output
String
Downloads Containerd files from Containerd releases and installs it the provided path. Once installation is complete, the downloaded files are deleted to save on disk space.
Once Containerd is installed and added to the environment path, we can get the path where it is installed using:
((Get-Command -Name containerd.exe).Source | Split-Path -Parent).TrimEnd("\bin")
NOTE: If Containerd already exists at the specified install path, it will be uninstalled and the specified version will be installed.
Parameters
Name | Type | Description | Default |
---|---|---|---|
Version | String | Containerd version to install | Latest version |
InstallPath | String | Path to install Containerd | $Env:ProgramFiles\containerd |
DownloadPath | String | Path to download Containerd | $HOME\Downloads |
Setup | Switch | Register and start Containerd Service once Containerd installation is done | |
Force | Switch | Installs Containerd even if the tool already exists at the specified path | |
Confirm | Switch | Prompts for confirmation before running the cmdlet. For more information, see the following articles: about_Preference_Variables and about_Functions_CmdletBindingAttribute | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Create a default Containerd configuration file called config.toml
at the Containerd path and registers the Containerd service.
Parameters
Name | Type | Description | Default |
---|---|---|---|
ContainerdPath | String | Path where Containerd is installed | The Containerd path in the environment path variable or $Env:ProgramFiles\containerd |
Start | Switch | Start Containerd service after registration is complete | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Starts Containerd service
Parameters
None
Output
None
Stops Containerd service
Parameters
None
Output
None
Does the following:
- Stops Containerd service
- Unregisters Containerd service
- Deletes Containerd directory
- Removes Containerd from the environment path
Parameters
Name | Type | Description | Default |
---|---|---|---|
Path | String | Path where Containerd is installed | The Containerd path in the environment path variable or $Env:ProgramFiles\containerd |
Force | Switch | Bypass confirmation to uninstall Containerd | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Returns the latest BuildKit version number.
Parameters
None
Output
String
Downloads BuildKit files from Containerd releases and installs it the provided path. Once installation is complete, the downloaded files are deleted to save on disk space.
Once BuildKit is installed and added to the environment path, we can get the path where it is installed using:
((Get-Command -Name buildctl.exe).Source | Split-Path -Parent).TrimEnd("\bin")
NOTE: If BuildKit already exists at the specified install path, it will be uninstalled and the specified version will be installed.
Parameters
Name | Type | Description | Default |
---|---|---|---|
Version | String | BuildKit version to install | Latest version |
InstallPath | String | Path to install BuildKit | $Env:ProgramFiles\BuildKit |
DownloadPath | String | Path to download BuildKit | $HOME\Downloads |
Setup | Switch | Register and start buildkitd Service once Containerd installation is done | |
Force | Switch | Installs Buildkit even if the tool already exists at the specified path | |
Confirm | Switch | Prompts for confirmation before running the cmdlet. For more information, see the following articles: about_Preference_Variables and about_Functions_CmdletBindingAttribute | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Registers the buildkitd service with a prompt to either register with the Containerd CNI configurations (0-containerd-nat.conf) or not.
Parameters
Name | Type | Description | Default |
---|---|---|---|
BuildkitPath | String | Path where BuildKit is installed | The BuildKit path in the environment path variable or $Env:ProgramFiles\BuildKit |
WinCNIPath | String | Path to Windows CNI plugin | The Containerd path in the environment path variable or $Env:ProgramFiles\Containerd |
Start | Switch | Start buildkitd service after registration is complete | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Starts BuildKit service and waits for 30 seconds for the service to start. If the service does not start within the this time, execution terminates with an error.
Parameters
None
Output
None
Stops BuildKit service Parameters
None
Output
None
Does the following:
- Stops buildkitd service
- Unregisters buildkitd service
- Deletes BuildKit directory
- Removes BuildKit from the environment path
Parameters
Name | Type | Description | Default |
---|---|---|---|
Path | String | Path where BuildKit is installed | The BuildKit path in the environment path variable or $Env:ProgramFiles\BuildKit |
Force | Switch | Bypass confirmation to uninstall BuildKit | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Returns the latest nerdctl version number.
Parameters
None
Output
String
Downloads Containerd files from nerdctl releases and installs it the provided path. Once installation is complete, the downloaded files are deleted to save on disk space.
Parameters
Name | Type | Description | Default |
---|---|---|---|
Version | String | nerdctl version to install | Latest version |
InstallPath | String | Path to install nerdctl | $Env:ProgramFiles\nerdctl |
DownloadPath | String | Path to download nerdctl | $HOME\Downloads |
Dependencies | String[] | Specify the nerdctl dependencies (All, Containerd, Buildkit, WinCNIPlugin) to install. | |
Force | Switch | Installs nerdctl even if the tool already exists at the specified path | |
Confirm | Switch | Prompts for confirmation before running the cmdlet. For more information, see the following articles: about_Preference_Variables and about_Functions_CmdletBindingAttribute | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Deletes the nerdctl directory and removes it from the environment variables.
Parameters
Name | Type | Description | Default |
---|---|---|---|
Path | String | Path where nerdctl is installed | The nerdctl path in the environment path variable or $Env:ProgramFiles\BuildKit |
Force | Switch | Bypass confirmation to uninstall nerdctl | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Returns the latest Windows CNI version number.
Parameters
None
Output
String
Downloads Windows CNI plugin from windows-container-networking and installs it in the specified location.
Parameters
Name | Type | Description | Default |
---|---|---|---|
WinCNIVersion | String | Windows CNI version to install | Latest version |
WinCNIPath | String | Location to install Windows CNI | Path where Containerd is installed or $Env:ProgramFiles\Containerd |
Force | Switch | Installs Windows CNI plugins even if the tool already exists at the specified path | |
Confirm | Switch | Prompts for confirmation before running the cmdlet. For more information, see the following articles: about_Preference_Variables and about_Functions_CmdletBindingAttribute | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Initializes a NAT network.
NOTE: This function installs the HNS module.
Parameters
Name | Type | Description | Default |
---|---|---|---|
NetworkName | String | Name of the network. If a network with a similar name exists, the function terminates with an error message | Default: nat |
Gateway | String | Gateway IP address | Default gateway address |
CIDR | Int | Size of the subnet mask | 16 |
WinCNIVersion | String | Windows CNI version to use | Latest version |
WinCNIPath | String | Absolute path to cni directory ~\cni. Not ~\cni\bin | Path where Containerd is installed or $Env:ProgramFiles\Containerd\cni |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None
Uninstalls Windows CNI plugins.
Parameters
Name | Type | Description | Default |
---|---|---|---|
Path | String | Path where Windows CNI plugins is installed | $Env:ProgramFiles\containerd\cni |
Force | Switch | Bypass confirmation to uninstall Windows CNI plugins | |
WhatIf | Switch | Shows what would happen if the cmdlet runs. The cmdlet isn't run. |
Output
None