Skip to content

Incremental Dev Container Rebuild

When you are building out a configuration for Codespaces using a dev container, the default behavior is now to do an incremental rebuild. The existing rebuild functionality is still available and has been renamed to ‘Full rebuild’.

Incremental rebuild is much faster because it builds on top of your existing docker cache, reusing common images and layers between rebuilds. This is readily apparent when adding configurations to the default container for Codespaces which is quite large.

When using VS Code, you access these commands from the command palette.

Rebuild commands in the command palette in Visual Studio Code!

The rebuild behavior prior to this change was full rebuild, which is slower but guarantees correctness because it removes all images from the virtual machine before re-pulling even unchanged images. You may occasionally want to do this after many iterations of rebuilding your configuration, and want to free up disk space or ensure your configuration is not dependent on layers that won’t be present during a clean creation of a codespace from the configuration.

Dependabot has added support for updating dependencies in Yarn v2 and Yarn v3 manifests (package.json, and yarn.lock files). This is in addition to the existing support for Yarn v1. There is no action required for existing repositories where Dependabot security updates is enabled, however, if you would like to receive proactive updates with Dependabot version updates, you should add configuration for the npm ecosystem to your dependabot.yml file.

For more information:

See more

With an organizational level policy to restrict container images, organization administrators can now control which base container images are used while creating organization-owned codespaces. This enables administrators to ensure that only verified container images are being used to create organization-owned codespaces.
allowed image policy screenshot

Organization admins can specify which images and/or image sources are allowed to be used while creating organization-owned codespaces. If the image specified in the dev container configuration does not match one of the allowed images, then subsequent codespace creation will fail asking you to update the image in your configuration. The base image policy does not apply to the default image, or the image that's used to recover a codespace if an error is introduced into a dev container configuration which prevents the container from being rebuilt.

For this release, the image policy will be applied at codespace creation and will not be applied when you rebuild a container. Support for the rebuild scenario is coming soon. We'd love your feedback on this policy and any additional policies that will help your scenarios on Codespaces discussions.

For more information, see Restricting base images for organization-owned codespaces

See more