Skip to content

Building Pode

If you have Pode's source code checked out locally on your machine, you can follow these steps to build Pode:

Windows

  1. Install InvokeBuild Module

    Install-Module InvokeBuild -Scope CurrentUser
    

    Using Chocolatey

    choco install invoke-build
    
  2. Test

    To run the unit tests, run the following command from the root of the repository (this will build Pode and, if needed, auto-install Pester/.NET):

    Invoke-Build Test
    
  3. Build

    To just build Pode, before running any examples, run the following:

    Invoke-Build Build
    
  4. Packaging

    To create a Pode package. Please note that docker has to be present to create the containers.

    Invoke-Build Pack
    
  5. Install locally

    To install Pode from the repository, run the following:

    Invoke-Build Install-Module
    

    To uninstall, use:

    Invoke-Build Remove-Module
    

  6. CleanUp

    To clean up after a build or a pack, run the following:

    Invoke-Build clean
    

Linux

  1. Register the Microsoft Repository

    CentOS

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo curl -o /etc/yum.repos.d/microsoft.repo https://packages.microsoft.com/config/centos/8/prod.repo
    

    RedHat

    sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
    sudo curl -o /etc/yum.repos.d/microsoft.repo https://packages.microsoft.com/config/rhel/9/prod.repo
    

    Debian / Ubuntu

    sudo apt-get update
    sudo apt-get install -y wget apt-transport-https software-properties-common
    wget https://packages.microsoft.com/config/debian/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    sudo apt-get update;
    
  2. Install InvokeBuild Module

    Install-Module InvokeBuild -Scope CurrentUser
    
  3. Test

    To run the unit tests, run the following command from the root of the repository (this will build Pode and, if needed, auto-install Pester/.NET):

    Invoke-Build Test
    
  4. Build

    To just build Pode, before running any examples, run the following:

    Invoke-Build Build
    
  5. Packaging

    To create a Pode package. Please note that docker has to be present to create the containers.

    Invoke-Build Pack
    
  6. Install locally

    To install Pode from the repository, run the following:

    Invoke-Build Install-Module
    

    To uninstall, use:

    Invoke-Build Remove-Module
    

MacOS

An easy way to install the required components is to use brew:

  1. Install dotnet:

    brew install dotnet
    
  2. Install InvokeBuild Module

    Install-Module InvokeBuild -Scope CurrentUser
    
  3. Test

    To run the unit tests, run the following command from the root of the repository (this will build Pode and, if needed, auto-install Pester/.NET):

    Invoke-Build Test
    
  4. Build

    To just build Pode, before running any examples, run the following:

    Invoke-Build Build
    
  5. Packaging

    To create a Pode package. Please note that docker has to be present to create the containers.

    Invoke-Build Pack
    
  6. Install locally

    To install Pode from the repository, run the following:

    Invoke-Build Install-Module
    

    To uninstall, use:

    Invoke-Build Remove-Module