This is the quick guide about how to geneate the customized image for Dev Box. The main steps are as below:
- Create a Gallery
- Configure for Gallery
- Create Service Principal
- Generate the image
-
Search "Azure Compute Galleries" in the Azure Portal, click the service "Azure compute galleries"

-
Give the gallery name and select the resource group, then click "Review + Create"

-
Fork the base repository Azure/dev-box-images

-
In your forked repository, change the value in gallery.yml:
name: "the gallery name that we just created in the above step" resourceGroup: "the resource group that the gallery is located"
Please check the mapping as below:

- Create a Service Principal with the Azure CLI command as below:
az ad sp create-for-rbac --sdk-auth --role contributor --scopes /subscriptions/ -n
You will get the output as below: { "clientId": "", "clientSecret": "", "subscriptionId": "", "tenantId": "" (...) }
Remove all the line breaks and keep a single link as below: { "clientId": "", "clientSecret": "", "subscriptionId": "", "tenantId": "", (...) }
Secret name is "AZURE_CREDENTIALS". Value is the single line that we prepared before as below: { "clientId": "", "clientSecret": "", "subscriptionId": "", "tenantId": "", (...) }
Enable it if there is an option asking to click.
- Define the software to install Go to images/VSCodeBox/build.pkr.hcl If the software can be installed by choco, just execute the command "choco install" to install. Note: --confirm is required otherwise, it will be installed by confirm yes or no. If the software cannot be installed by choco, please write up the related PowerShell script to install the specific software.
Once you commit the change under the folder images or scripts, the GitHub action pipeline will be triggered.





