Containers-Toolkit 0.0.0-beta

Additional Details

Test package.

This is a prerelease version of Containers-Toolkit.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Containers-Toolkit --version 0.0.0-beta
                    
NuGet\Install-Package Containers-Toolkit -Version 0.0.0-beta
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Containers-Toolkit" Version="0.0.0-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Containers-Toolkit" Version="0.0.0-beta" />
                    
Directory.Packages.props
<PackageReference Include="Containers-Toolkit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Containers-Toolkit --version 0.0.0-beta
                    
#r "nuget: Containers-Toolkit, 0.0.0-beta"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Containers-Toolkit@0.0.0-beta
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Containers-Toolkit&version=0.0.0-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Containers-Toolkit&version=0.0.0-beta&prerelease
                    
Install as a Cake Tool

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. HNS module

    To install the HNS module, follow the instructions here

    Reference:

Installation and Setup

Install-Module -Name containers-toolkit -RequiredVersion "__NEW_VERSION__"

Download signed source files

  1. 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"
    
  2. Verify the signature

    $HASH_VALUE = "__HASH_VALUE__"
    (Get-FileHash -Algorithm SHA256 containers-toolkit.tar.gz).Hash -eq $HASH_VALUE
    
  3. Expand 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 -Force
    
  4. Unblock 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

  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

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.

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

There are no supported framework assets in this package.

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