Skip to content

xrowgmbh/containers-toolkit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CONTAINERS TOOLKIT POWERSHELL MODULE

CI Build DevSkim cf-image

Table of contents

  1. Introduction
  2. Usage
  3. Important Notes
  4. Contribution
  5. Related Projects

Introduction

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

Usage

Installing and importing Containers-Toolkit module

Install the 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 Source files

Coming soon

Clone the repo

Option 1: Clone containers-toolkit into one of the folder locations in the $env:PSModulePath environment variable.

  1. To get a possible module path:

    $env:PSModulePath -split ";"
  2. Clone the repo

    cd <selected-module-path>
    git clone https://github.com/microsoft/containers-toolkit.git
  3. 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

  1. Clone the repo

    git clone https://github.com/microsoft/containers-toolkit.git
  2. Add the directory to @indows PowerShell module path

    $env:PSModulePath = "$env:PSModulePath;<path-to-module-directory>"
  3. Import the module

    Import-Module -Name containers-toolkit -Force

Get the module details

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

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

  1. Error when running Import-Module

TODO

  • Set up GitWorkflow files:
  • Pipeline configuration:
  • 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

Contribution

Related Projects

This project builds on work done by others to create a PowerShell module.

Other relevant repositories

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%