0

I am trying to use the following to create a container in Azure:

New-NavContainer -accept_eula -containerName "test" -auth Windows -imageName 
"mcr.microsoft.com/businesscentral/sandbox:base" -includeCSide -enableSymbolLoading -licenseFile 
"licence.flf"

But it doesnt seem to allow setting the ResourceGroup in Azure: So instead i tried using the following:

az container create --name test--image "mcr.microsoft.com/businesscentral/sandbox" --resource- 
group testGroup --os-type Windows --cpu 2 --memory 3 --environment-variables ACCEPT_EULA=Y 
ACCEPT_OUTDATED=Y USESSL=N --ip-address public --port 80 443 7048 7049 8080 

I use the image name "mcr.microsoft.com/businesscentral/sandbox", but does that get the latest image ?

But where do i specify the LicenseFile ?

Debbie.S
  • 167
  • 11
  • By default it should take it as latest if no "tag" is specified. You can see how latest is specified here [link](https://learn.microsoft.com/en-us/cli/azure/container?view=azure-cli-latest#az-container-create). For the license you can store it a as a secret and refer to the secret or use a yaml file to deploy that license to the server again from a secret. – Kristian Kanchev Jun 24 '20 at 10:26
  • ok i am using the environment variable tag : --environment-variables ACCEPT_OUTDATED=Y ACCEPT_EULA=Y USESSL=N LICENSEFILE='https://mystorage.blob.core.windows.net/groupname/filename.flf?ab=b&sig=aaaa%BBB%12213232323' . But it gives an error saying because the link for the license file is not escaped correctly. Are single quotes ok as I have tried " " and does not work. – Debbie.S Jun 24 '20 at 11:44

1 Answers1

0

If you prefer to have your development sandbox in a container on your local machine, you must have Docker installed and working on your machine.

First, the username and password that you defined will be converted into PowerShell credential objects, and then the New-NavContainer command does all the heavy lifting to create your sandbox.

You can also immediately create a NAV Container on Azure Container Instances via the Azure CLI. If you want to create the NAV container and uploading your Development License, you need to add this parameter in the environment variables:

-e ACCEPT_EULA=Y USESSL=N LICENSEFILE=c:\myfolder\license.flf

For more details, you could refer to this article.

Joey Cai
  • 18,968
  • 1
  • 20
  • 30