Containers-Toolkit
0.0.0-beta
Test package.
dotnet add package Containers-Toolkit --version 0.0.0-beta
NuGet\Install-Package Containers-Toolkit -Version 0.0.0-beta
<PackageReference Include="Containers-Toolkit" Version="0.0.0-beta" />
<PackageVersion Include="Containers-Toolkit" Version="0.0.0-beta" />
<PackageReference Include="Containers-Toolkit" />
paket add Containers-Toolkit --version 0.0.0-beta
#r "nuget: Containers-Toolkit, 0.0.0-beta"
#:package Containers-Toolkit@0.0.0-beta
#addin nuget:?package=Containers-Toolkit&version=0.0.0-beta&prerelease
#tool nuget:?package=Containers-Toolkit&version=0.0.0-beta&prerelease
CONTAINERS TOOLKIT POWERSHELL MODULE
Table of contents
Introduction
Containers-Toolkit is a Windows PowerShell module for downloading, installing, and configuring Containerd, Buildkit, nerdctl, and Windows CNI plugins for container networks. It also allows you to get a list of the container tools and their installation statuses.
Configurations done with these functions are default configurations that allow you to get started with interacting with the tools. Further configurations may be necessary.
You can find documentation for these functions here: Containers-Toolkit Documentation
Prerequisites
PowerShell: Minimum Version 7
HNSmoduleTo install the HNS module, follow the instructions here
Reference:
Installation and Setup
Install Containers-Toolkit module from PowerShell Gallery
Install-Module -Name containers-toolkit -RequiredVersion "__NEW_VERSION__"
Download signed source files
Download source files
Invoke-WebRequest -Uri "https://github.com/microsoft/containers-toolkit/releases/download/__NEW_VERSION__/containers-toolkit-__NEW_VERSION__.tar.gz" -OutFile "containers-toolkit.tar.gz"Verify the signature
$HASH_VALUE = "__HASH_VALUE__" (Get-FileHash -Algorithm SHA256 containers-toolkit.tar.gz).Hash -eq $HASH_VALUEExpand the tar file
$ModulePath = "$env:USERPROFILE\Documents\WindowsPowerShell\Modules" if (!(Test-Path -Path $ModulePath)) { New-Item -ItemType Directory -Path $ModulePath | Out-Null } tar.exe -xvf containers-toolkit.tar.gz -C $ModulePath Remove-Item -Path containers-toolkit.tar.gz -ForceUnblock the files
Get-ChildItem -Path $ModulePath -Recurse | Unblock-File
Downloading the source code from Containers-Toolkit repository
To use the module, fork/clone the repository to your local machine and setup your development environment
Usage
All the Containers-Toolkit files, including *.ps1, *.psd1, *.psm1, and *.ps1xml, have been
code signed. This means that you will be able to run the module in a PowerShell session
where the execution policy is set to AllSigned or RemoteSigned.
To learn more about PowerShell execution policies, see about_Execution_Policies.
Get the module details
Get-Help containers-toolkit
Get-Module -Name containers-toolkit -ListAvailable
Command reference
- 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
List of available commands
Get-Command -Module containers-toolkit
Examples
Get help for Install-Containerd command
Get-Help Install-ContainerdList container tools (Containerd, BuildKit, and nerdctl) install status
Show-ContainerToolsInstalls 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'
Important Notes
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, RestartNeededTo enable a feature:
Enable-WindowsOptionalFeature -Online -FeatureName '<Feature-Name-Here>' -All -NoRestartRequires PowerShell modules HNS
FAQs
Please visit the FAQs.md to see the how to resolve common issues.
Contribution
Please look into the Contribution Guide to know how to develop and contribute.
Legal and Licensing
PowerShell is licensed under the MIT license.
Code of Conduct
Please see our Code of Conduct before participating in this project.
Security Policy
For any security issues, please see our Security Policy.
Attributions
This project builds on the work of others to create a PowerShell module.
Credits (in alphabetic order):
| Author/Repository | Link |
|---|---|
| Anthony Nandaa (@profnandaa) | cni-setup-legacy.ps1 |
| Gabriel Samfira (@gabriel-samfira) | setup_buildkitd_on_windows.ps1 |
| James Sturtevant (@jsturtevant) | Windows Containers on Windows 10 without Docker (using Containerd) |
| kubernetes-sigs/sig-windows-tools | Install-Containerd.ps1 |
| Marat Radchenko (@slonopotamus) | Stevedore |
| Markus Lippert (@lippertmarkus) | containerd-installer |
| microsoft/Windows-Containers | install-containerd-runtime.ps1 |
| Mirantis | Install MCR on Windows Servers |
Container tools installed with this module
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|