aio

AIO Bun Image

The codjix/aio:bun image provides a lightweight container for running applications with the Bun JavaScript runtime. This image is built on top of the AIO base image and includes the Bun runtime environment.

Image Information

Features

Usage

Basic Usage

# Start a Bun REPL
docker run -it --name aio-bun codjix/aio:bun

# Run a Bun script
docker run -it --name aio-bun -v $(pwd):/app -w /app codjix/aio:bun bun run index.ts

Running a Web Application

docker run -d --name aio-bun-app -v $(pwd):/app -w /app -p 3000:3000 codjix/aio:bun bun run index.ts

Environment Variables

Volumes

Mount your application code to any directory, commonly /app:

docker run -it -v $(pwd):/app -w /app codjix/aio:bun

Working with Dependencies

To install and use dependencies with Bun:

# Install dependencies
docker run -it -v $(pwd):/app -w /app codjix/aio:bun bun install

# Run with dependencies
docker run -it -v $(pwd):/app -w /app codjix/aio:bun bun run start

Docker Compose Example

version: '3'

services:
  bun-app:
    image: codjix/aio:bun
    container_name: aio-bun-app
    ports:
      - "3000:3000"
    volumes:
      - ./app:/app
    working_dir: /app
    command: bun run index.ts
    environment:
      - NODE_ENV=development
      - BUN_RUNTIME_TRANSPILER_CACHE_PATH=0

Source Code

The Dockerfile and associated scripts for this image are available in the src/bun directory of the AIO repository.