- Requires Bun to be installed (e.g., via the
bunfeature). - Exports
BUN_INSTALL=/usr/localto ensure global binaries land in/usr/local/bin. - Useful for installing tools distributed as Bun packages (e.g.,
@vercel/turbo). - Accepts both bare names and
npm:-prefixed names; Bun defaults to npm registry, sonpm:is optional.
- Requires root to install globally to
/usr/local(matches other package helper features). - Skip-if-installed:
- For
version: "latest"(or empty), skips when the package is already present inbun pm -l. - For pinned installs (e.g.,
"version": "1.2.3"), skips only when the exact<name>@<version>is already installed.
- For
- For non-npm specs (git / URL / GitHub shorthand), use
nameHintif the name shown bybun pm -ldiffers from your install spec.
Default latest:
"features": {
"ghcr.io/devcontainers-extra/features/bun-package:1": {
"package": "@vercel/turbo"
}
}Pinned version:
"features": {
"ghcr.io/devcontainers-extra/features/bun-package:1": {
"package": "@vercel/turbo",
"version": "2.5.6"
}
}- Supports any spec Bun accepts in
bun add, including git URLs (e.g.,git+https://...), GitHub shorthand (e.g.,github:user/repo), and tarball URLs. - For non-npm sources, the name shown in
bun pm -lmay not match the install spec. Use the optionalnameHintoption to tell the feature which name to look for when deciding to skip.
"features": {
"ghcr.io/devcontainers-extra/features/bun:1": {},
"ghcr.io/devcontainers-extra/features/bun-package:1": {
"package": "git+https://github.com/user/tool.git",
"nameHint": "tool"
}
}"features": {
"ghcr.io/devcontainers-extra/features/bun:1": {},
"ghcr.io/devcontainers-extra/features/bun-package:1": {
"package": "github:user/repo",
"nameHint": "repo"
}
}Note: Private registries (e.g., GitHub Packages, Artifactory) may require registry / auth setup via .npmrc or Bun config in the container.
- Distros:
Debian/UbuntuandAlpine - Architectures:
x86_64andarm64