Skip to content

Containers-Toolkit is a Windows PowerShell module for downloading, installing, and setting up default configs for Containerd, BuildKit, Windows CNI plugin, and nerdctl.

License

Notifications You must be signed in to change notification settings

microsoft/containers-toolkit

Repository files navigation

CONTAINERS TOOLKIT POWERSHELL MODULE

CI Build DevSkim cf-image

Table of contents

  1. Introduction
  2. Prerequisites
  3. Installation and Setup
  4. Usage
  5. Important Notes
  6. FAQs
  7. Contribution

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

  1. PowerShell: Minimum Version 7

  2. ThreadJob module

    Install-Module -Name ThreadJob -Force
  3. HNS module

    To install the HNS module, follow the instructions here

    Reference:

Installation and Setup

Install Containers-Toolkit module from PowerShell Gallery

COMING SOON: We are currently working on publishing this module to PS Gallery to make it easier to import the module

Download signed source files

Coming soon

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

Get the module details

Get-Help containers-toolkit
Get-Module -Name containers-toolkit -ListAvailable

Command reference

  1. List of all available commands can be found in the Command reference section
  2. Detailed command reference for each cmdlet can be found in the About section

List of available commands

Get-Command -Module containers-toolkit

Examples

  1. Get help for Install-Containerd command

    Get-Help Install-Containerd
  2. List container tools (Containerd, BuildKit, and nerdctl) install status

    Show-ContainerTools
  3. 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'

Important Notes

  1. Requires elevated PowerShell to run some commands.

  2. 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
  3. Requires PowerShell modules HNS and ThreadJob

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

About

Containers-Toolkit is a Windows PowerShell module for downloading, installing, and setting up default configs for Containerd, BuildKit, Windows CNI plugin, and nerdctl.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published