Containers-Toolkit is a Windows PowerShell module for downloading, installing, and setting up default configs for Containerd, BuildKit, Windows CNI plugin, and nerdctl.
COMING SOON: We are currently working on publishing this module to PS Gallery to make it easier to import the module
Coming soon
Option 1: Clone containers-toolkit into one of the folder locations in the $env:PSModulePath
environment variable.
-
To get a possible module path:
$env:PSModulePath -split ";"
-
Clone the repo
cd <selected-module-path> git clone https://github.com/microsoft/containers-toolkit.git
-
Import the module
Import-Module -Name containers-toolkit -Force
Option 2: Clone containers-toolkit to a folder location of choice and add the new module location to the Windows PowerShell module path
-
Clone the repo
git clone https://github.com/microsoft/containers-toolkit.git
-
Add the directory to @indows PowerShell module path
$env:PSModulePath = "$env:PSModulePath;<path-to-module-directory>"
-
Import the module
Import-Module -Name containers-toolkit -Force
Get-Help containers-toolkit
Get-Module -Name containers-toolkit
- List of all available commands can be found in the Command reference section
- Detailed command reference for each cmdlet can be found in the About section
Get-Command -Module containers-toolkit
-
Get help for Install-Containerd command
Get-Help Install-Containerd
-
List container tools (Containerd, BuildKit, and nerdctl) install status
Show-ContainerTools
-
Installs Containerd version 1.7.7 at 'C:\Test\Path\containerd' and adds 'C:\Test\Path\containerd' in the environment path.
Install-Containerd -Version "1.7.7" -InstallPath 'C:\Test\Path\Containerd'
-
Requires elevated PowerShell to run some commands.
-
To use these tools (Containerd, BuildKit, and nerdctl), ensure that Containers and HyperV Windows features are enabled.
To get the features to enable, use:
Get-WindowsOptionalFeature -Online | ` Where-Object { $_.FeatureName -like 'containers' -or $_.FeatureName -match "Microsoft-Hyper-V(-All)?$" } | ` Select-Object FeatureName, Possible, State, RestartNeeded
To enable a feature:
Enable-WindowsOptionalFeature -Online -FeatureName '<Feature-Name-Here>' -All -NoRestart
- Error when running Import-Module
- Set up GitWorkflow files:
- GitHub Repository Structure Best Practices
- Setup ARM64 self-hosted runner
- Dependabot to update version in main + Licence
- Pipeline configuration:
- Code Analysis with DevSkim
- Publish module to PSGallery
- Fix Code analysis warnings
- Dev install: (Hacks) Add functions in Containerd and BuildKit to build from source files. (Is this really necessary? May be an overkill)
- Publish to Microsoft Learn: MicrosoftDocs / Virtualization-Documentation
- Rename this module to containerstoolkit: The current name for this module might cause confusion with repository named windows-containers-tools
- Update README.md (Documentation)
- Update containers-toolkit/containers-toolkit.Format.ps1xml (Documentation)
- Update Containers-Toolkit/Containers-ToolkitlsForWindows.help.txt (Documentation)
- Use Containers-Toolkit
- Add Pester test
- Replace GitHub username in URL: https://github.com/...
-
Rootless installation: Not needed for Windows
This project builds on work done by others to create a PowerShell module.