tl;dr - this cannot be done.

If you want to do this, you need to create a local custom feature. This can be solved fairly elegantly by calling the package via a bash script.

As an example, the neovim-homebrew package demonstrates how to call a package from another package via the Dev Containers CLI

Answer from MrSimonEmms on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › blogs › 2022 › 09 › 15 › dev-container-features
Custom Dev Container Features
September 15, 2022 - You can also explore official and publicly contributed Features on the specification site. Any Feature can be added by editing devcontainer.json, and publicly published ones can be added through existing dev container configuration experiences (such as available in the VS Code Dev Containers extension).
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › create-dev-container
Create a Dev Container
November 3, 2021 - It allows you to open any folder or repository inside a container and take advantage of Visual Studio Code's full feature set. A devcontainer.json file in your project tells VS Code how to access (or create) a development container with a ...
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › containers
Developing inside a Container
November 3, 2021 - When you use Dev Containers: Add Dev Container Configuration Files, you're presented a list of scripts to customize the existing dev container configurations, such as installing Git or the Azure CLI: When you rebuild and reopen in your container, the Features you selected will be available in your devcontainer.json:
🌐
Steve Kinney
stevekinney.com › courses › visual studio code › personalizing dev containers
Personalizing Dev Containers | Visual Studio Code | Steve Kinney
Dev Containers offer a range of advanced features that further enhance flexibility and integration. Concept: Bind mounts allow you to mount a directory or file from your host machine directly into the container. This is how your project folder is mounted into the container by default, enabling seamless file editing. Custom Bind Mounts: You can define additional bind mounts in devcontainer.json using the mounts property (or dockerComposeFile for Docker Compose, see later).
🌐
GitHub
docs.github.com › codespaces › setting-up-your-project-for-codespaces › introduction-to-dev-containers
Introduction to dev containers - GitHub Docs
You can add features to a devcontainer.json file from VS Code or from your repository on GitHub. See Adding features to a devcontainer.json file. If none of the predefined configurations meets your needs, you can create a custom configuration by writing your own devcontainer.json file.
🌐
Development Containers
containers.dev › supporting
Supporting tools and services
The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code’s full feature set.
🌐
Medium
medium.com › versent-tech-blog › introduction-to-dev-containers-4c01cb1752a0
Introduction to Dev Containers. An introduction to Dev Containers in… | by Mathew Hemphill | Versent Tech Blog | Medium
June 19, 2024 - { "name": "Java Development", "build": { "dockerfile": "./Dockerfile", "context": "." }, "features": { "ghcr.io/devcontainers/features/git:1": { "version": "latest", "ppa": "false" } }, "containerEnv": { "JAVA_HOME": "/usr/lib/jvm/java-21-amazon-corretto" }, "customizations": { "vscode": { "settings": {}, "extensions": [ "vscjava.vscode-java-pack" ] } }, "remoteUser": "root" }
Find elsewhere
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › tutorial
Dev Containers tutorial
November 3, 2021 - Once all of this is done, your local copy of Visual Studio Code connects to the Visual Studio Code Server running inside of your new dev container. The devcontainer.json is basically a config file that determines how your dev container gets built and started. //devcontainer.json { "name": "Node.js", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile "image": "mcr.microsoft.com/devcontainers/javascript-node:0-18", // Features to add to the dev container.
🌐
PAUL'S BLOG
paulyu.dev › article › extending-vscode-devcontainer-features
Extending Visual Studio Code Dev Container Features | PAUL'S BLOG
July 27, 2022 - Using this approach, I can build my own custom feature and reference them in the features block within the devcontainer.json file and add any Azure CLI extension like any other feature in the Dev Container build format.
🌐
Docker Hub
hub.docker.com › r › microsoft › vscode-devcontainers
microsoft/vscode-devcontainers - Docker Image
Learn more about VS Code at: https://code.visualstudio.com⁠ · The Remote - Containers⁠ extension lets you use a Docker container⁠ as a full-featured development environment. The extension starts a development container running a well defined tool and runtime stack. Workspace files can be mounted into the container from the local file system, or copied or cloned into it once the container is running. A simple devcontainer.json file tells VS Code how to manage the container or you can just attach to one that is already running.
🌐
GitHub
microsoft.github.io › vscode-essentials › en › 09-dev-containers.html
Developing in a Container · Visual Studio Code - The Essentials
By default, the container uses a pre-built Docker image, but you can also define your own custom image. Simply create a Dockerfile in the .devcontainer folder and replace the image property with:
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › tips-and-tricks
Dev Containers Tips and Tricks
November 3, 2021 - You can use custom instructions with dev containers to give Copilot more information about the type of dev container you're connected to (like what kind of languages or toolchains are installed). You can achieve this in a few ways: Add "github.copilot.chat.codeGeneration.instructions" directly in your devcontainer.json · We publish dev container resources (like images and Features) to make the process of creating and connecting to dev containers even easier, and we now include custom instructions in these files.
🌐
Josephguadagno
josephguadagno.net › home › 2022 › 12 › 10
Getting Started with Dev Containers - JosephGuadagno.net
December 10, 2022 - The customizations property in the devcontainer.json file is where you can customize the instance of Visual Studio Code that will be used in the container. This is where you can add extensions, settings, and more.
🌐
GitHub
github.com › devcontainers › features
GitHub - devcontainers/features: A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own · GitHub
A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own - devcontainers/features
Starred by 1.4K users
Forked by 590 users
Languages   Shell
🌐
Development Containers
containers.dev › features
Available Dev Container Features
Development containers documentation and specification page.
🌐
GitHub
docs.github.com › en › codespaces › setting-up-your-project-for-codespaces › configuring-dev-containers › adding-features-to-a-devcontainer-file
Adding features to a devcontainer.json file - GitHub Docs
By default, the latest version of the feature will be used. To choose a different version, or configure other options for the feature, expand the properties listed under "Options" to view the available values, then add the options by manually editing the object in your devcontainer.json file.
🌐
DEV Community
dev.to › jajera › creating-your-own-dev-container-feature-for-vs-code-1men
Creating Your Own Dev Container Feature for VS Code - DEV Community
December 31, 2025 - Learn how to develop and publish custom Dev Container Features for VS Code, using the Amazon Q CLI feature as a practical example. Includes forking, feature creation, publishing to GHCR, and submitting to the official features index. Tagged with devcontainer, vscode, github, features.