Edit

Share via


Microsoft Dev Box customizations

Note

Microsoft Dev Box is at Build 2025!

Join us online or in person for our Breakout session: Unleash developer potential with AI and Dev Box Register online for free!

  • Thursday, May 22; 8:30 AM - 9:30 AM PDT.

If you're attending Build in person, sign up for our hands-on lab Build the ultimate enterprise ready cloud development environment

  • Tuesday, May 20 3:30 PM - 4:45 PM PDT
  • Thursday, May 22 10:15 AM - 11:30 AM PDT

Getting developers started on a new project or team is often complex and time consuming. The Microsoft Dev Box customizations feature helps you streamline the setup of the developer environment. With customizations, you can configure ready-to-code workstations with the necessary applications, tools, repositories, code libraries, packages, and build scripts.

Dev Box customizations let you:

  • Install the necessary tools and applications.
  • Enforce organizational security policies.
  • Ensure consistency across dev boxes.

Microsoft Dev Box offers two ways to use customizations.

  • Team customizations create a standard shared configuration for a team of developers in place of creating multiple standard or golden images for your teams.

  • User customizations enable developers to create a configuration for their personal preferences. User customizations enable developers to store their configuration in a file and run it when they create a dev box, providing consistency across all their dev boxes.

Feature Team customizations User customizations
Configure on Dev box pool Dev box
Customizations apply to All dev boxes in pool Individual dev box
Easily shareable Yes No
Customizations file name imagedefinition.yaml myfilename.yaml
Sourced from Catalog or personal repository Uploaded or from personal repository
Supports key vault secrets Yes Yes

What is a customization file?

Dev Box customizations use a YAML-formatted file to specify a list of tasks to apply from the dev center or a catalog when developers create a dev box. These tasks identify the catalog task and provide parameters like the name of the software to install. Developers can create their own customization files or use a shared customization file.

You can use secrets from your Azure key vault in your customization file to clone private repositories, or with any custom task you author that requires an access token.

What are tasks

Dev Box customization tasks are wrappers for PowerShell scripts. You use them to define reusable components that your teams can use in their customizations. WinGet and PowerShell tasks are available through the platform, and new ones can be added through a catalog. Tasks can run in either a system context or a user context after sign-in.

  • Project admins define team customizations, which can use both custom and built-in tasks.
  • User customizations can only use system tasks if the user is an administrator, or if the tasks are custom tasks preapproved by through a catalog. Standard dev box users can't run built-in PowerShell and WinGet tasks in a system context, which prevents privilege escalation.

When you create tasks, determine which need to run in a system context and which can run in a user context after sign-in.

Differences between team customizations and user customizations

Dev Box team customizations allow developer team leads and IT admins to preconfigure customization files for dev box pools, eliminating the need for developers to go through manual setup.

Microsoft recommends using team customizations to secure and standardize dev box deployments for a team. Sharing common YAML files among developer teams can be inefficient, lead to errors, and violate compliance policies.

In addition to team customizations, individual developers can upload a customization file when they create their dev box to control the development environment. Developers should use individual customizations for personal settings and apps only.

How do customizations work?

Team customization and user customizations are both YAML-based files that specify a list of tasks to apply when creating a dev box. Select the appropriate tab to learn more about how each type of customization works.

How do team customizations work?

You can use team customizations to define a shared Dev Box configuration for each of your development teams without having to invest in setting up an imaging solution like Packer or Azure virtual machine (VM) image templates. Team customizations provide a lightweight alternative that allows central platform engineering teams to delegate Dev Box configuration management to the teams that use them.

Team customizations also offer a built-in way to optimize your team's Dev Box customizations by flattening them into a custom image. You use the same customization file, without the need to manage added infrastructure or maintain image templates.

Configuring Dev Box team customizations for your organization requires careful planning and informed decision-making. The following diagram provides an overview of the process and highlights key decision points.

Diagram that shows the workflow for Dev Box team customizations, including steps for planning, configuring, and deploying customizations.

Configure your Dev Box service for team customizations

Set up your Dev Box service to support team customizations by following these steps:

  1. Configure your dev center:
    1. Enable project-level catalogs.
    2. Assign permissions for project admins.
  2. Decide whether to use a catalog with custom reusable components:
    • Built-in (provided by the platform):
      1. Use PowerShell or WinGet built-in tasks (starts with ~/). We recommend starting with the built-in tasks.
    • Your own catalog:
      1. Host in Azure Repos or GitHub.
      2. Add tasks.
      3. Attach to a dev center.
  3. Create a YAML customization file:
    1. Create a customization file called imagedefinition.yaml.
  4. Specify an image in a dev box pool:
    1. Create or modify a dev box pool and specify imagedefinition.yaml as the image definition.
  5. Choose how to use the image definition:
    • Run the tasks in the image definition at the time of every dev box creation
    • Optimize your image definition into a custom image.
  6. Create dev box:
    1. Create your dev box from the configured pool by using the developer portal.

To learn more about team customization and writing image definitions, see Write an image definition file for Dev Box team customizations. Then, to learn how to optimize your image definition into a custom image, see Configure imaging for Dev Box team customizations.