- Bun Website: https://bun.com/
- Bun GitHub: https://github.com/oven-sh/bun
This feature installs Bun via the repository's gh-release helper, which downloads the correct release asset for the current platform and architecture and places the bun binary in /usr/local/bin. This follows the repo鈥檚 best practices for reproducibility and small image layers.
Bun supports executing binaries with bun x <pkg>. Some environments/tools expect a bunx executable. To provide a consistent experience, this feature adds a small shim at /usr/local/bin/bunx that forwards to bun x. If the upstream release reliably includes a bunx binary in the future, the shim can be removed without breaking users.
Default (latest):
"features": {
"ghcr.io/devcontainers-extra/features/bun:1": {}
}Pin a specific version:
"features": {
"ghcr.io/devcontainers-extra/features/bun:1": {
"version": "1.1.38"
}
}- Distros:
Debian/UbuntuandAlpine - Architectures:
x86_64andarm64
This feature is tested against various Distro:
Ubuntu(latest)Debian(latest)Alpine(latest)Debianwith a pinned version of Bun (e.g., Bunv1.1.38)
- If Bun鈥檚 release assets ever require explicit filtering, we can wire an
assetRegexor passadditionalFlagsto thegh-releasehelper. The helper already auto-filters by platform/arch, so no extra flags are set currently. - Coexistence with Node.js: this feature only installs
bunand abunxshim and does not modify Node.js. - PATH/profile: installation to
/usr/local/binavoids profile changes.