A lightweight Ubuntu 24.04-based Docker image with Node.js, Bun, and Deno pre-installed.
284
A lightweight Docker image that includes multiple JavaScript/TypeScript runtime environments (Node.js, Bun, and Deno) built on Ubuntu 24.04.
Pull the image:
docker pull nandsachita/js-runtime
Run a container:
docker run -it nandsachita/js-runtime
FROM nandsachita/js-runtime
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build if needed
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
FROM nandsachita/js-runtime
WORKDIR /app
# Copy package files
COPY package.json bun.lockb ./
# Install dependencies
RUN bun install
# Copy source code
COPY . .
# Build if needed
RUN bun run build
EXPOSE 3000
CMD ["bun", "start"]
FROM nandsachita/js-runtime
WORKDIR /app
# Copy dependency file if you have one
COPY deno.json deno.lock ./
# Cache dependencies
RUN deno cache deps.ts
# Copy source code
COPY . .
EXPOSE 8000
CMD ["deno", "run", "--allow-net", "main.ts"]
FROM nandsachita/js-runtime
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy source code
COPY . .
# Build the application
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
# Build stage
FROM nandsachita/js-runtime AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Production stage
FROM nandsachita/js-runtime
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY package*.json ./
RUN npm install --production
EXPOSE 3000
CMD ["npm", "start"]
The following environment variables are pre-configured:
DEBIAN_FRONTEND=noninteractivePATH includes Bun and Deno binariesThe default working directory is set to /app
docker run -it nandsachita/js-runtime node
docker run -it nandsachita/js-runtime bun
docker run -it nandsachita/js-runtime deno
docker run -it -v $(pwd):/app nandsachita/js-runtime
Build the image locally:
docker build -t nandsachita/js-runtime .
For support, please open an issue on the GitHub repository.
Sachita Nand
latest: Ubuntu 24.04 with latest versions of Node.js LTS, Bun, and DenoContent type
Image
Digest
sha256:c4ca6023f…
Size
215.9 MB
Last updated
over 1 year ago
docker pull nandsachita/js-runtime