Containers/New-Container.ps1
function New-Container { Param( [Parameter(Mandatory=$false)] [string] $ContainerName, [Parameter(Mandatory=$false)] [string] $ImageName, [Parameter(Mandatory=$false)] [string] $LicenseFile, [Parameter(Mandatory=$false)] [pscredential] $Credential, [switch]$alwaysPull ) if ($null -eq $ContainerName -or $ContainerName -eq "") { $ContainerName = (Get-EnvironmentKeyValue -KeyName 'name') } if ($null -eq $Credential) { $NewCredential = New-CredentialFromEnvironmentJson if ($NewCredential -eq $false) { $Credential = [PSCredential]::new('admin', (ConvertTo-SecureString 'P@ssword1' -AsPlainText -Force)) } else { $Credential = $NewCredential } } if ($null -eq $ImageName -or $ImageName -eq "") { $ImageName = (Get-ImageNameForRepo) } New-NavContainer -containerName $ContainerName -accept_eula -accept_outdated -auth NavUserPassword ` -Credential $Credential -imageName $ImageName -licenseFile $LicenseFile -updateHosts ` -useBestContainerOS -includeAL -shortcuts None -includeTestToolkit -includeTestLibrariesOnly -alwaysPull:($alwaysPull.IsPresent) } Export-ModuleMember New-Container |