Sign inSign up

fusionaxi/bun-node

By fusionaxi

•Updated about 23 hours ago

Ready to use Bun and Node.js Docker Images

Image
Languages & frameworks
Developer tools
Web servers
0

1.8K

fusionaxi/bun-node repository overview

⁠FusionAxi Bun + Node.js

Bun tooling and the official Node.js runtime in one container image. Use Bun to install dependencies, run TypeScript, and build your application, then run the resulting JavaScript with Node.js.

  • Image: fusionaxi/bun-node
  • Architectures: linux/amd64 and linux/arm64
  • Default variant: slim
  • Default user: bun (UID/GID 1001:1001)
  • Working directory: /app

Source code⁠ · Dockerfile⁠ · Available tags⁠ · Report an issue⁠

⁠Quick start

docker pull fusionaxi/bun-node:latest
docker run --rm fusionaxi/bun-node:latest bun --version
docker run --rm fusionaxi/bun-node:latest node --version

Run a local TypeScript file with Bun:

docker run --rm -v "$PWD:/app" fusionaxi/bun-node:slim ./main.ts

Install project dependencies with Bun:

docker run --rm -v "$PWD:/app" fusionaxi/bun-node:slim bun install

Bind-mounted directories must allow UID 1001 to write when installing dependencies or producing build output.

⁠Variants

VariantRuntime baseIncluded tooling
slimOfficial Node.js Debian Bookworm slimBun, bunx, Node.js, Tini
debianOfficial Node.js Debian BookwormBun, bunx, Node.js, Tini
alpineOfficial Node.js AlpineBun's musl build, bunx, Node.js, Tini
alpine-gitOfficial Node.js AlpineAlpine tooling plus Git, Git LFS, OpenSSH client

The alpine-git variant initializes Git LFS at the system level. Choose a Debian variant when your application requires a glibc-based environment.

⁠Tags

Tag patternMeaning
latestNewest supported Node.js LTS, slim variant
<variant>Newest supported Node.js LTS with the selected variant
<node-major>-<variant>Latest selected patch in a supported Node.js major
<node-version>-<variant>Exact Node.js version with the release's selected stable Bun
<bun-version>-<node-version>-<variant>Exact Bun and Node.js versions with the selected variant

Version placeholders use numeric versions without a leading v. Releases select the latest stable Bun and the newest Node.js patch in each supported Current, Active LTS, and Maintenance LTS major. Bun canary and prereleases are excluded.

Versioned tags can be rebuilt to refresh their operating system packages. Pin a published digest (fusionaxi/bun-node@sha256:...) when you need an immutable reference. Consult the available tags page for published versions.

⁠Build with Bun, run with Node.js

For a project with main.ts, use this Dockerfile:

FROM fusionaxi/bun-node:slim

COPY --chown=bun:bun main.ts /app/main.ts
RUN bun build main.ts --target=node --outdir=dist

CMD ["node", "dist/main.js"]
docker build -t my-bun-node-app .
docker run --rm my-bun-node-app

For projects with dependencies, copy package.json and bun.lock, run bun install --frozen-lockfile, and then copy and build the application source. See the Node.js example⁠.

⁠Container behavior

The default command is bun --help. Explicit executable commands such as bun, node, and sh run directly. Flag-only arguments and non-executable script paths are passed to Bun, so docker run --rm fusionaxi/bun-node:slim --version prints the Bun version.

Tini runs as the init process, and the entrypoint executes the selected command to preserve signals and exit codes. Container startup makes no telemetry requests.

Global Bun packages install under /home/bun/.bun, with executables in /home/bun/.bun/bin on PATH. The application directory and Bun installation directory are writable by bun. Bun's runtime transpiler cache is disabled through BUN_RUNTIME_TRANSPILER_CACHE_PATH=0.

Use COPY --chown=bun:bun for application files. When adding system packages in a derived image, switch to USER root for installation and back to USER bun afterward.

Tag summary

Content type

Image

Digest

sha256:5ac649042…

Size

131.5 MB

Last updated

about 23 hours ago

docker pull fusionaxi/bun-node